diff options
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 41b3cb73..cf3334ca 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -466,7 +466,7 @@ module Axlsx col.width = width if [Integer, Float, Fixnum].include?(width.class) c_style = style[index] if [Integer, Fixnum].include?(style[index].class) #BUG - col.width wil only be nil the first time the column object is created. Subsequent row adds will not update the width of the column! col.width || - next if width == :ignore || col.width || (cell.value.is_a?(String) && cell.value.start_with?('=')) + next if width == :ignore || col.width || (cell.value.is_a?(String) && cell.value.start_with?('=') || cell.value == nil) if self.workbook.use_autowidth cell_xf = cellXfs[(c_style || 0)] font = fonts[(cell_xf.fontId || 0)] |
