Skip to content
Browse files

Support nil cells for all types

  • Loading branch information...
1 parent 2407940 commit 32c027461698a81142772d60f142996f2fa2e113 @jurriaan committed Apr 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/axlsx/workbook/worksheet/cell.rb
View
2 lib/axlsx/workbook/worksheet/cell.rb
@@ -386,6 +386,7 @@ def cell_type_from_value(v)
# 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 @@ def cast_value(v)
elsif @type == :boolean
v ? 1 : 0
else
- return nil if v.nil?
@type = :string
::CGI.escapeHTML(v.to_s)
end

0 comments on commit 32c0274

Please sign in to comment.
Something went wrong with that request. Please try again.