Hello,

While the situation with documentation is very frustrating indeed, here's 
the workaround I ended up with:

GData library is used by many Google APIs, and they all use similar logic.
For instance, Google Calendar API v2 used it, and (while deprecated) their 
Python docs are still available here:
https://developers.google.com/google-apps/calendar/v2/developers_guide_python

So I looked at Google Spreadsheet .Net guide (to get the idea of underlying 
entities used by the server), old Google Calendar docs (to get the feeling 
how those entities might look like in Python), did some digging in Python 
library code and debugger info and managed to put together some stuff that 
worked for me.

Here's how you can get a value of a certain cell, update it and push it 
back:
https://gist.github.com/4634422

Best regards,
Egor.


On Monday, November 12, 2012 7:20:42 PM UTC+4, plartoo wrote:
>
> Hello,
>
> I've been trying to write data into spreadsheet using it. But when I 
> search for Google's official documentation of Python gdata library, I'm 
> being redirected to <
> https://developers.google.com/google-apps/spreadsheets> and that page 
> doesn't seem to have any examples in Python (it's all in .NET, Protocol and 
> Java)
>
> I also googled around to find examples, and found one here <
> http://www.mattcutts.com/blog/write-google-spreadsheet-from-python/>. But 
> that example no longer works as mentioned in one of the posts in this 
> forum; it returns me 400 error as follows:
> 'reason': server_response.reason, 'body': result_body}
> gdata.service.RequestError: {'status': 400, 'body': 'We&#39;re sorry, a 
> server error occurred. Please wait a bit and try reloading your 
> spreadsheet.', 'reason': 'Bad Request'}
>
> My example spreadsheet has three columns named, "Messages", "To" and 
> "When". The spreadsheet's name is "MessagesSent". I know the 
> spreadsheet_key and id (od6) per instructions in the above example. I am 
> trying to insert data into spreadsheet by:
> # initialize gd_client etc. above
> entry = gd_client.InsertRow(d, spreadsheet_key, worksheet_id)
>
> Please let me know if you need more information to help. Thank you so much 
> if anyone can help me move forward with my project.
>
> -plartoo
>
>

-- 


Reply via email to