diff options
| author | Jonathan Tron <[email protected]> | 2012-07-07 20:35:49 +0200 |
|---|---|---|
| committer | Jonathan Tron <[email protected]> | 2012-07-07 20:35:49 +0200 |
| commit | c5981835dbcae425dd0e468a90d88cd49bea42d3 (patch) | |
| tree | f412967582918a9642960b2f4540fec307b5984d /lib | |
| parent | fb4f5feb9d38ee49142a18eb6a1921fd3567964f (diff) | |
| download | caxlsx-c5981835dbcae425dd0e468a90d88cd49bea42d3.tar.gz caxlsx-c5981835dbcae425dd0e468a90d88cd49bea42d3.zip | |
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`.
Diffstat (limited to 'lib')
| -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 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 |
