diff options
| author | Joe Kain <[email protected]> | 2012-03-09 14:08:39 -0800 |
|---|---|---|
| committer | Joe Kain <[email protected]> | 2012-03-12 00:56:48 -0700 |
| commit | ccd59b3d88907da35a3cded14ba9cfa3a6379bd2 (patch) | |
| tree | 80afeca7569e9a5e53e4f95b83a5312de800e76b | |
| parent | 32b9175cca482fe02a69ec7cc4e362d70c4e1324 (diff) | |
| download | caxlsx-ccd59b3d88907da35a3cded14ba9cfa3a6379bd2.tar.gz caxlsx-ccd59b3d88907da35a3cded14ba9cfa3a6379bd2.zip | |
Fix Cell#r_abs to handle multi-digit row numbers and multi-letter
column ids.
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index 62fa539f..ff759cdf 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -230,7 +230,7 @@ module Axlsx # @example Absolute Cell Reference # ws.rows.first.cells.first.r #=> "$A$1" def r_abs - "$#{r.split('').join('$')}" + "$#{r.match(%r{([A-Z]+)([0-9]+)})[1,2].join('$')}" end # @return [Integer] The cellXfs item index applied to this cell. |
