Replies: 1 comment
-
I've got the same problem with versions 2.128.0 and 2.147.0, and by trial and error, I have found that it is fixed by specifying the values = [
['X', 'X', 'X'],
]
body = {
"valueInputOption": 'USER_ENTERED',
"data": [{
"dataFilter": {
'gridRange': {
'sheetId': id_sheet,
'startRowIndex': 0,
'endRowIndex': 1,
'startColumnIndex': 0,
'endColumnIndex': 3,
},
},
"majorDimension": 'ROWS', # <-- THIS
"values": values
}]
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using
batchUpdateByDataFilter
with agridRange
to update a sheet.I can get the request to work, but I've noticed that I cannot match the shape of my gridRange to the shape of my values, unless the shape of my values is square (equal length for rows and columns).
I don't know if this is expected behavior or not, but the fact that I'm able to pass a gridRange with independent lengths for width and height seems to suggest that its not. Is this a bug or expected?
Example request body
results in a 400 with this response
For this example I have to increment the
endRowIndex
up to 3 for the request to succeed.Are bounded gridRanges required to be square?
I can see in the documentation, the only examples are for square, half-bounded, or fully unbounded ranges.
https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#gridrange
UPDATE
Testing a little bit more and I've found that I can not issue an update when passing a greater than 26 rows, suggesting that I am bounded to an equivalent column width, even when I issue the command with and unbounded range.
Returned 400
v2.62.0 / Python 3.10 on Windows 10
Beta Was this translation helpful? Give feedback.
All reactions