I think your problem is you getting out of your worksheet boundaries. When
you create a blank sheet you get 25 (I am not sure exactly about this
number) columns and 1000 rows sheet. When you call any cell beyond these
limits you get this error:
Exception Value: Server responded with: 400, Invalid query parameter value for
range.
Since you call 1113th row and get error I am supposed to think you have
1000 rows sheet. You need to manually expend worksheet rows size in browser
(add {N} more rows at bottom) or create new worksheet with more then 1000
rows.
After that you can select ranges you needed. When I need to upload much
data into GSheets I usually upload with 10k cell batches
PS. ws.range("A6:D1113") works fine. ws.range("R6C1:R1113C4") gives same
result
On Friday, January 9, 2015 at 8:30:51 PM UTC+3, [email protected] wrote:
>
> Just tried it with R1C1 notation and got the same error. Any other ideas?
>
> On Friday, January 9, 2015 at 7:20:25 AM UTC-8, LauraBeth Lincoln wrote:
>>
>> Have you tried with R1C1 notation instead?
>>
>> So instead of A6:D1113 you would use R6C1:R1113C4
>>
>> On Thu, Jan 8, 2015 at 10:31 PM, <[email protected]> wrote:
>>
>>> Here is my request:
>>>
>>> token = gdata.gauth.OAuth2Token(
>>> client_id= CLIENT_ID,
>>> client_secret= CLIENT_SECRET,
>>> scope='https://spreadsheets.google.com/feeds',
>>> user_agent="TOLA",
>>> access_token = "ACCESS_TOKEN",
>>> refresh_token = "REFRESH_TOKEN")
>>> gd_client =
>>> gdata.spreadsheets.client.SpreadsheetsClient(source="TOLA")
>>> gd_client = token.authorize(gd_client)
>>>
>>> feed = gd_client.get_worksheets(sprd_key)
>>> id_parts = feed.entry[0].id.text.split('/')
>>> wrksht_key = id_parts[len(id_parts) - 1]
>>>
>>> range = "A6:D1113"
>>> cellq = gdata.spreadsheets.client.CellQuery(range=range,
>>> return_empty='true')
>>> cells = gd_client.GetCells(sprd_key, wrksht_key, q=cellq)
>>> batch = gdata.spreadsheets.data.BuildBatchCellsUpdate(sprd_key,
>>> wrksht_key)
>>> n = 1
>>> for cell in cells.entry:
>>> cell.cell.input_value = str(n)
>>> batch.add_batch_entry(cell, cell.id.text,
>>> batch_id_string=cell.title.text, operation_string='update')
>>> n = n + 1
>>> gd_client.batch(batch, force=True)
>>>
>>>
>>> On Thursday, January 8, 2015 at 6:19:25 PM UTC-8, LauraBeth Lincoln
>>> wrote:
>>>>
>>>> Can you include your request?
>>>> On Jan 8, 2015 6:47 PM, <[email protected]> wrote:
>>>>
>>>>> I use the Google python gdata client library in order to do batch
>>>>> updates to a Google Spreadsheet. However, Google Spreadsheet, by default,
>>>>> has 1000 rows. When my batch update exceeds that limit, then I get the
>>>>> following error message:
>>>>>
>>>>> "Server responded with: 400, Invalid query parameter value for range."
>>>>>
>>>>>
>>>>> The stack trace is:
>>>>>
>>>>> "
>>>>>
>>>>> Traceback:
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in
>>>>> get_response
>>>>> 112. response = wrapped_callback(request,
>>>>> *callback_args, **callback_kwargs)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py"
>>>>> in _wrapped_view
>>>>> 22. return view_func(request, *args, **kwargs)
>>>>> File "/Users/mkhan/dev/tola/htdocs/feed/views.py" in google_export
>>>>> 278. cells = gd_client.GetCells(sprd_key, wrksht_key, q=cellq)
>>>>> File
>>>>> "/usr/local/lib/python2.7/site-packages/gdata/spreadsheets/client.py" in
>>>>> get_cells
>>>>> 376. **kwargs)
>>>>> File "/usr/local/lib/python2.7/site-packages/gdata/client.py" in get_feed
>>>>> 640. **kwargs)
>>>>> File "/usr/local/lib/python2.7/site-packages/gdata/client.py" in request
>>>>> 319. RequestError)
>>>>>
>>>>> Exception Type: RequestError at /google_export/
>>>>> Exception Value: Server responded with: 400, Invalid query parameter
>>>>> value for range.
>>>>>
>>>>> "
>>>>>
>>>>>
>>>>> I searched through StackOverflow as well as this Google Group but have
>>>>> not found an answer. I'd appreciate any help you provide.
>>>>>
>>>>> --
>>>>> 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 [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>
>>
>> --
>> -lb
>>
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.