diff options
| author | Jonathan Tron <[email protected]> | 2012-02-22 18:56:53 +0100 |
|---|---|---|
| committer | Jonathan Tron <[email protected]> | 2012-02-22 18:56:53 +0100 |
| commit | 7d288efdc175dd9db030ada073aab360ea1b6b95 (patch) | |
| tree | ea7a4a5bcfca4f8d4eed42bc108af809e31bfd43 /examples/example.rb | |
| parent | ac16190cdd4b0d20ec25f3d92b9e842b1ea51348 (diff) | |
| download | caxlsx-7d288efdc175dd9db030ada073aab360ea1b6b95.tar.gz caxlsx-7d288efdc175dd9db030ada073aab360ea1b6b95.zip | |
Add :date support to Axlsx::Cell and add missing part for boolean support
- date is now separated from Time support so that it does not include
unwanted hours/minutes/seconds
- missing boolean support was the xml generation specific to :boolean
type
Diffstat (limited to 'examples/example.rb')
| -rw-r--r-- | examples/example.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/example.rb b/examples/example.rb index cedf4ace..2d60a474 100644 --- a/examples/example.rb +++ b/examples/example.rb @@ -113,6 +113,15 @@ sheet.add_row [1, 2, 3, "=SUM(A2:C2)"] end +##Automatic cell types + + wb.add_worksheet(:name => "Automatic cell types") do |sheet| + t = Time.now + sheet.add_row ["Date", "Time", "String", "Boolean", "Float", "Integer"] + sheet.add_row [Date.today, t, "value", true, 0.1, 1] + sheet.add_row ["", t.to_f, "", "", "", ""] + end + ##Merging Cells. wb.add_worksheet(:name => 'Merging Cells') do |sheet| |
