nithinmurali / pygsheets

Google Sheets Python API v4
https://pygsheets.readthedocs.io/en/latest
Other
1.5k stars 220 forks source link

apply_format range error #593

Open dorbal opened 7 months ago

dorbal commented 7 months ago

Describe the bug I tried to change a column format except the first cell, but the format was applied to the whole column. I took a look at the code and the bug probably caused by the GridRange.

To Reproduce Steps to reproduce the behavior:

from pygsheets.address import GridRange
//...
grange1 = GridRange.create('G:G', wks)
grange2 = GridRange.create('G2:G', wks)
print(grange1.to_json())
print(grange2.to_json())

# see error
# Output:
# {'sheetId': '...', 'startColumnIndex': 6, 'endColumnIndex': 7}
# {'sheetId': '...', 'startColumnIndex': 6, 'endColumnIndex': 7} # <- it should be different

System Information