diff options
| author | Randy Morgan <[email protected]> | 2012-03-26 20:56:52 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-26 20:56:52 +0900 |
| commit | 52cbce94266035ec7608f1193bb9a881e193da3a (patch) | |
| tree | 000ec51d486ea123d6386d296c00a03bdfa6dbc6 | |
| parent | b07ea515f85c9314ca4fa981cb9267693effa821 (diff) | |
| download | caxlsx-52cbce94266035ec7608f1193bb9a881e193da3a.tar.gz caxlsx-52cbce94266035ec7608f1193bb9a881e193da3a.zip | |
need to make columns - even if we are not using auto_width
| -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 a85da6fc..430dda60 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -493,7 +493,6 @@ module Axlsx # @param [Array] cells an array of cells # @param [Array] widths an array of cell widths @see Worksheet#add_row def update_auto_fit_data(cells, widths=[]) - return cells unless self.workbook.use_autowidth # TODO delay this until rendering. too much work when we dont know what they are going to do to the sheet. styles = self.workbook.styles cellXfs, fonts = styles.cellXfs, styles.fonts @@ -503,6 +502,7 @@ module Axlsx width = widths[index] # set fixed width and skip if numeric width is given col[:fixed] = width if [Integer, Float, Fixnum].include?(width.class) + next unless self.workbook.use_autowidth # ignore default column widths and formula next if width == :ignore || (item.value.is_a?(String) && item.value.start_with?('=')) # make sure we can turn that fixed with off! |
