I had the same issue using batch updates. Thank you! Had to use append 
first as I have more than 26 columns needed for my first row. Then run the 
batch updates. :)

On Saturday, January 18, 2020 at 11:28:59 PM UTC+8, Alex Ivanov ✔ wrote:
>
> Thank you Benjamin!
>
> I'm not alone! I'm also need to resize the sheet before batch updates.
>
> This requires more requests than anticipated in the design.
>
> As I know Google Apps Script does this automatically.
>
> On Saturday, January 18, 2020 at 3:13:17 PM UTC+3, Benjamin Birney wrote:
>>
>> Four years later--I had a similar problem.  I needed to update 1000+ rows 
>> into a newly-created Google Sheet using updateBatch() (php SDK, but similar 
>> to others I'm sure), but the spreadsheet only had 1,000 rows.  So Google 
>> wouldn't let me do the batchUpdate(), and said it exceeds grid limits.
>>
>> I solved the problem by first running an append() operation with n empty 
>> rows, where n is my total update row count minus 1,000.  Then, after the 
>> rows existed as a result of the append(), I ran my bulkUpdate() operation.  
>> It's kludgy, and Google should really add an option to automatically expand 
>> the grid size, but it solves the problem.
>>
>> On Sunday, November 6, 2016 at 3:33:20 PM UTC-5, Karl Webmarketing wrote:
>>>
>>> Hi Google Sheets API Support team,
>>>
>>> We are automating our Adwords reporting by using the Adwords API and the 
>>> Google Sheets API to display the extracted data.
>>>
>>> We are running into an error message when making a BatchUpdate to a 
>>> dynamically created spreadsheet.
>>>
>>> The error message we are getting is:
>>>
>>> com.google.api.client.googleapis.json.GoogleJsonResponseException: 400 
>>> Bad Request
>>> {
>>>   "code" : 400,
>>>   "errors" : [ {
>>>     "domain" : "global",
>>>     "message" : "Invalid data[0]: Range (Sheet1!10001:20000) exceeds 
>>> grid limits. Max rows: 10000, max columns: 26",
>>>     "reason" : "badRequest"
>>>   } ],
>>>   "message" : "Invalid data[0]: Range (Sheet1!10001:20000) exceeds grid 
>>> limits. Max rows: 10000, max columns: 26",
>>>   "status" : "INVALID_ARGUMENT"
>>> }
>>>
>>> What we are doing is populating the spreadsheet in 10,000 rows of data 
>>> each time. The first report data block goes well (Range: Sheet1!1:10000) 
>>> however, when we get to the 2nd data block, this error is displayed.
>>>
>>> If we try to update the data in other quantities (for example 2000 or 
>>> 5000 rows per insertion), we get the same error message, however it says 
>>> "Max rows: 2000, max columns: 26" and "Max rows: 5000, max columns: 26" 
>>> respectively. If we try to update 20000 rows at once, another error message 
>>> says that we are trying to update row 10001 when the limit is 10000 
>>> (obiously because the Value Range data now contains more rows than the 
>>> predefined range).
>>>
>>> There is no documentation anywhere regarding this error message and it 
>>> is not really clear what it means. The range Sheet1!10001:20000 contains 
>>> clearly less than 10000 rows (20000-10001 = 9999 rows) so there is not a 
>>> clear reason as to why this message is displaying. If the problem is with 
>>> the number of columns, then we'd like to know what exactly the problem 
>>> would be as we have also tried to reduce the number of columns targeted (in 
>>> A1 notation) and we still get the same error message.
>>>
>>> Thanks,
>>>
>>> Marc.
>>>  
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-spreadsheets-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-spreadsheets-api/e82500f8-d367-46dd-8581-fdbc53f013b6%40googlegroups.com.

Reply via email to