From f51a4ce6a22f0b651eebf6f84a18a913d22013b2 Mon Sep 17 00:00:00 2001
From: Randy Morgan
License: MIT License
-Latest Version: 1.0.0
+Latest Version: 1.0.2
Release Date: November 20th 2011
**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.
+To install Axlsx, use the following command:
@@ -88,20 +92,57 @@ It enables the you to generate 100% valid xlsx files that include customised styGenerating 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| + = { :bg_color => "FF000000", :fg_color => "FFFFFFFF", :sz=>14, :alignment => { :horizontal=> :center } } + header_style = package.workbook.styles.add_style + 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 styChangelog
Axlsx © 2011 by Randy Morgan. Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.
-- cgit v1.2.3