From f51a4ce6a22f0b651eebf6f84a18a913d22013b2 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Mon, 21 Nov 2011 08:59:50 +0900 Subject: patched bug in package test case. upped the version --- doc/index.html | 82 ++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 66 insertions(+), 16 deletions(-) (limited to 'doc/index.html') diff --git a/doc/index.html b/doc/index.html index 9d556159..ff39e7b5 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,7 +61,7 @@ Author: Randy Morgan Copyright: 2011
License: MIT License
-Latest Version: 1.0.0 +Latest Version: 1.0.2 Release Date: November 20th 2011

Synopsis

@@ -79,6 +79,10 @@ It enables the you to generate 100% valid xlsx files that include customised sty

**4. Automatic type support: Axlsx will automatically determine the type of data you are generating. In this release Float, Integer, String and Time types are automatically identified and serialized to your spreadsheet.

+

**5. Automatic column widths: Axlsx will automatically determine the appropriate width for your columns based on the content in the worksheet.

+ +

**6. Support for both 1904 and 1900 epocs configurable in the workbook.

+

Installing

To install Axlsx, use the following command:

@@ -88,20 +92,57 @@ It enables the you to generate 100% valid xlsx files that include customised sty

Usage

-

Generating a workbook with styles and a chart: - p = Axlsx::Package.new do |package|

- -
package.workbook.add_worksheet do |sheet|
-  sheet.add_row ["First", "Second", "Third"], :style => Axlsx::STYLE_THIN_BORDER
-  sheet.add_row [1, 2, 3], :style => Axlsx::STYLE_THIN_BORDER
-  sheet.add_chart(Axlsx::Bar3DChart, :start_at => [0,2], :end_at => [5, 15], :title=>"example 1: Chart") do |chart|
-    chart.add_series :data=>sheet.rows.last.cells, :labels=> sheet.rows.first.cells
-  end
-end
-package.serialize("example1.xlsx")
+

Simple Workbook

+ +
 p = Axlsx::Package.new do |package|
+   package.workbook.add_worksheet do |sheet|
+     sheet.add_row ["First", "Second", "Third"]
+     sheet.add_row [1, 2, 3]
+   end
+   package.serialize("example1.xlsx")
+ end  
 
-

end

+

Generating A Bar Chart

+ +
 p = Axlsx::Package.new do |package|
+   package.workbook.add_worksheet do |sheet|
+     sheet.add_row ["First", "Second", "Third"]
+     sheet.add_row [1, 2, 3]
+     sheet.add_chart(Axlsx::Bar3DChart, :start_at => [0,2], :end_at => [5, 15], :title=>"example 1: Chart") do |chart|
+       chart.add_series :data=>sheet.rows.last.cells, :labels=> sheet.rows.first.cells
+     end
+   end
+   package.serialize("example1.xlsx")
+ end  
+
+ +

Generating A Pie Chart

+ +
 p = Axlsx::Package.new do |package|
+   package.workbook.add_worksheet do |sheet|
+     sheet.add_row ["First", "Second", "Third"]
+     sheet.add_row [1, 2, 3]
+     sheet.add_chart(Axlsx::Pie3DChart, :start_at => [0,2], :end_at => [5, 15], :title=>"example 2: Pie Chart") do |chart|
+       chart.add_series :data=>sheet.rows.last.cells, :labels=> sheet.rows.first.cells
+     end
+   end
+   package.serialize("example3.xlsx")
+ end  
+
+ +

Using Custom Styles

+ +
 p = Axlsx::Package.new do |package|
+   style_options = { :bg_color => "FF000000", :fg_color => "FFFFFFFF", :sz=>14, :alignment => { :horizontal=> :center } }
+   header_style = package.workbook.styles.add_style style_options
+   package.workbook.add_worksheet do |sheet|
+     sheet.add_row ["Text Autowidth", "Second", "Third"], :style => header_style
+     sheet.add_row [1, 2, 3], :style => Axlsx::STYLE_THIN_BORDER
+   end
+   package.serialize("example3.xlsx")
+ end  
+

Documentation

@@ -116,18 +157,27 @@ It enables the you to generate 100% valid xlsx files that include customised sty

Changelog

-

Copyright

+

Axlsx © 2011 by Randy Morgan. Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.

-- cgit v1.2.3