Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import gspread
- from oauth2client.service_account import ServiceAccountCredentials
- import pprint
- import sys
- scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
- creds = ServiceAccountCredentials.from_json_keyfile_name('API Project-file-disini.json', scope)
- client = gspread.authorize(creds)
- sheet = client.open('CRUD_Excel').sheet1
- def UpdateX(ID,Nama):
- print("Updating")
- sheet.append_row([ID,Nama])
- if __name__== "__main__":
- UpdateX(sys.argv[1], sys.argv[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement