From 10a46e9956bb1a09bb3144845af9b35bb47726dc Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 16 Feb 2012 18:27:44 +0900 Subject: specifying a fixed with should not require exiting the each loop when setting auto_fit_data --- lib/axlsx/workbook/worksheet/worksheet.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index f84e9b92..eb6f55e9 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -352,7 +352,7 @@ module Axlsx col = @auto_fit_data[index] ||= {:longest=>"", :sz=>sz, :fixed=>nil} width = widths[index] # set fixed width and skip if numeric width is given - col[:fixed] = width and next if [Integer, Float, Fixnum].include?(width.class) + col[:fixed] = width if [Integer, Float, Fixnum].include?(width.class) # ignore default column widths and formula next if width == :ignore || (item.value.is_a?(String) && item.value.start_with?('=')) -- cgit v1.2.3