Get cell value from google spreadsheets

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lewis83
    New Member
    • Dec 2011
    • 2

    Get cell value from google spreadsheets

    Is there any way to get a cell value from google spreadsheets using python?
  • Jonsky
    New Member
    • Dec 2011
    • 1

    #2
    There are 2 options now for dealing with google spreadsheets:

    I've used both, and will opt for gspread. Google's lib is a way too verbose.

    Getting a cell value in gspread is simple enough:

    Code:
    # connect
    c = gspread.Client(auth=('johndoe@gmail.com','pass'))
    c.login()
    
    # open your spreadsheet
    s = c.open('annual results') 
    # and worksheet
    w = s.get_worksheet(0)
    
    # Finally get your value
    v = worksheet.cell(4, 2).value

    Comment

    • Lewis83
      New Member
      • Dec 2011
      • 2

      #3
      thank you mate! i've checked google api docs, but there's no docs for python lib only for java. this lib seems to be able to address my task

      Comment

      Working...