Skip to main content

Posts

Showing posts from September, 2018

Google Sheet API for Python

#https://www.youtube.com/watch?v=7I2s81TsCnc #https://www.youtube.com/watch?v=yPQ2Gk33b1U #Google developer console: https://console.developers.google.com #Learn more about gspread: https://github.com/burnash/gspread import gspread from oauth2client.service_account import ServiceAccountCredentials scope = [ 'https://spreadsheets.google.com/feeds' , 'https://www.googleapis.com/auth/drive' ] credentials = ServiceAccountCredentials.from_json_keyfile_name( 'gsheet-b076bd45d8fb.json' , scope) gc = gspread.authorize(credentials) wks = gc.open( 'DB' ).sheet1 #print(wks.get_all_records()) #wks.append_row(['Vijay', 23]) #wks.delete_row(3) #print(wks.cell(2,1).value) #wks.update_cell(2,1, 'Sathishkumar')