summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index 0f06bd13..7289bf3b 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -48,7 +48,7 @@ module Axlsx
def type=(v)
RestrictionValidator.validate "Cell.type", [:time, :float, :integer, :string], v
@type=v
- self.value = @value
+ self.value = @value unless @value.nil?
end
@@ -182,8 +182,10 @@ module Axlsx
self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
end
@style ||= 0
+ puts @type
@type ||= cell_type_from_value(value)
@value = cast_value(value)
+ puts @type
end
# @return [Integer] The index of the cell in the containing row.