From c5981835dbcae425dd0e468a90d88cd49bea42d3 Mon Sep 17 00:00:00 2001 From: Jonathan Tron Date: Sat, 7 Jul 2012 20:35:49 +0200 Subject: Fix a typo in `Axlsx::Worksheet#dimension` when a row was added without value. When `Axlsx::Worksheet#add_row` is called without values `#dimension` returned "AA:200" instead of "AA200", which resulted in a dimension of "A1:AA:200". This lead to an error in `Axlsx.name_to_indices` which is then called with "200" instead of "AA200" when using `Axlsx::Worksheet#abs_auto_filter`. --- 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 6a53e2ca..1abfcd0d 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -275,7 +275,7 @@ module Axlsx # @return [String] the A1:B2 style reference for the first and last row column intersection in the workbook def dimension dim_start = rows.first.cells.first == nil ? 'A1' : rows.first.cells.first.r - dim_end = rows.last.cells.last == nil ? 'AA:200' : rows.last.cells.last.r + dim_end = rows.last.cells.last == nil ? 'AA200' : rows.last.cells.last.r "#{dim_start}:#{dim_end}" end -- cgit v1.2.3