lib/write_xlsx/utility.rb in write_xlsx-0.85.1 vs lib/write_xlsx/utility.rb in write_xlsx-0.85.2

- old
+ new

@@ -257,13 +257,13 @@ # Ex: ("A4", "Hello") is converted to (3, 0, "Hello"). # def substitute_cellref(cell, *args) #:nodoc: return [*args] if cell.respond_to?(:coerce) # Numeric - cell.upcase! + normalized_cell = cell.upcase - case cell + case normalized_cell # Convert a column range: 'A:A' or 'B:G'. # A range such as A:A is equivalent to A1:65536, so add rows as required when /\$?([A-Z]{1,3}):\$?([A-Z]{1,3})/ row1, col1 = xl_cell_to_rowcol($1 + '1') row2, col2 = xl_cell_to_rowcol($2 + ROW_MAX.to_s) @@ -276,10 +276,10 @@ # Convert a cell reference: 'A1' or 'AD2000' when /\$?([A-Z]{1,3}\$?\d+)/ row1, col1 = xl_cell_to_rowcol($1) return [row1, col1, *args] else - raise("Unknown cell reference #{cell}") + raise("Unknown cell reference #{normalized_cell}") end end def underline_attributes(underline) if underline == 2