Created
November 10, 2016 09:46
-
-
Save riyadhalnur/81e8adb8db8483e6adf9c554e218b90f to your computer and use it in GitHub Desktop.
Retrieve the data from Google Forms that are saved to a Google Spreadsheets file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gspread | |
from oauth2client.service_account import ServiceAccountCredentials | |
SCOPE = ['https://spreadsheets.google.com/feeds'] | |
# The key file can be downloaded from Google Developer Console | |
KEY = 'yourkey.json' | |
# Authenticate using your key file | |
credentials = ServiceAccountCredentials.from_json_keyfile_name(KEY, SCOPE) | |
gc = gspread.authorize(credentials) | |
# List all available spreadsheets | |
gs = gc.openall() | |
print(gs) | |
# Open a single spreadsheet | |
gs = gc.open('Your Uber Form') | |
worksheet = gs.sheet1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment