diff options
| author | Jurriaan Pruis <[email protected]> | 2012-04-02 13:48:14 +0200 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2012-04-02 13:48:14 +0200 |
| commit | 32c027461698a81142772d60f142996f2fa2e113 (patch) | |
| tree | c621ca9a0f958b88904da502d28f32632e07978a /lib | |
| parent | 24079401c00af3b000644a57b82627556deea596 (diff) | |
| download | caxlsx-32c027461698a81142772d60f142996f2fa2e113.tar.gz caxlsx-32c027461698a81142772d60f142996f2fa2e113.zip | |
Support nil cells for all types
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index 48e77e31..6f90dfa7 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -386,6 +386,7 @@ module Axlsx # About Time - Time in OOXML is *different* from what you might expect. The history as to why is interesting, but you can safely assume that if you are generating docs on a mac, you will want to specify Workbook.1904 as true when using time typed values. # @see Axlsx#date1904 def cast_value(v) + return nil if v.nil? if @type == :date self.style = STYLE_DATE if self.style == 0 v @@ -399,7 +400,6 @@ module Axlsx elsif @type == :boolean v ? 1 : 0 else - return nil if v.nil? @type = :string ::CGI.escapeHTML(v.to_s) end |
