Reputation:
Can anybody please tell me is there any possible way to connect to spreadsheet from python? I want to store some data from a form and submit it to google spreadsheet. Please help on this issue. What steps do I have to follow?
Thanks in advance...
Upvotes: 3
Views: 3353
Reputation: 1230
The easiest way to connect to Google Spreadsheet is by using this spreadsheet library. These are the steps you need to follow:
import gspread
# Login with your Google account
gc = gspread.login('[email protected]','password')
# Spreadsheets can be opened by their title in Google Docs
spreadsheet = gc.open("_YOUR_TARGET_SPREADSHEET_")
# Select worksheet by index
worksheet = spreadsheet.get_worksheet(0)
# Update cell with your form value
worksheet.update_cell(1, 2, form_value_1)
Upvotes: 9
Reputation: 1802
Here is a very simple wrapper for the Google Spreasheets API i've recently written:
http://github.com/yoavaviram/python-google-spreadsheet
Its compatible with App Engine.
Upvotes: 1
Reputation: 2635
I have recently written a module to do this. check it out https://sourceforge.net/projects/pyworkbooks/
Upvotes: 0
Reputation: 881645
Sure, you can validate with OAuth then use the gdata Python API -- see this thread for more details and caveats, this code for a good simple example of OAuth use in Python on App Engine.
Upvotes: 1
Reputation: 43096
There is a python api for google docs http://code.google.com/intl/fr/apis/gdata/articles/python_client_lib.html. I am not sure if it works with app engine
Upvotes: 1