HOWTO: Get value from Google Spreadsheet using Python

Recently I have discovered a cool library written by Anton Burnashev called gspread which enables Google Spreadsheet manipulation using Python.

So, a task of extracting data from the spreadsheet becomes as simple as this:

import gspread
 
gc = gspread.login("your login", "your password")
wks = gc.open("document name").worksheet("sheet name")
 
cellValue = wks.acell("A1").value
print "Cell 'A1' has a value of %s" % cellValue

Comments