IncorrectCellLabel for whole rows and columns
sam-s opened this issue · comments
format_cell_ranges(ws, [('1', ...)]
raises
~/..../python3.6/site-packages/gspread/utils.py in a1_to_rowcol(label)
158 col += (ord(c) - MAGIC_NUMBER) * (26 ** i)
159 else:
--> 160 raise IncorrectCellLabel(label)
161
162 return (row, col)
IncorrectCellLabel: 1
despite https://github.com/robin900/gspread-formatting#specifying-cell-ranges
('A'
and 'A:A'
also raise the same exception)
@sam-s Thanks for the bug report.
I cannot reproduce the problem using gspread == 3.3.0
nor gspread==3.2.0
. I can do format_cell_range
and format_cell_ranges
using 'A'
, 'A:A'
, and '1'
, with successful formatting of the worksheet, and with no exception raised.
In order to support this kind of. "unbounded A1 notation" in my package, I had to implement my own a1_to_rowcol
function in the gspread_formatting.util
module.
Make sure you are using the latest version of my package, 0.1.1
, and let me know if you continue to experience problems.