Created
December 17, 2019 11:04
-
-
Save fejt/086cf0e1379b652a169eec7094da35f6 to your computer and use it in GitHub Desktop.
Python
This file contains 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
from oauth2client.service_account import ServiceAccountCredentials | |
import gspread | |
scope = ['https://spreadsheets.google.com/feeds', | |
'https://www.googleapis.com/auth/drive'] | |
credentials = ServiceAccountCredentials.from_json_keyfile_name('creds.json', scope) | |
gc = gspread.authorize(credentials) | |
sht1 = gc.open_by_url('https://docs.google.com/spreadsheets/d/19281OqG_UfOPL43QsbfvSa6zGK1b0IvaNZfpMam_vQk/edit?folder=0AEGcPXlb7cMeUk9PVA#gid=0') | |
content = open('input.csv', 'r').read() | |
gc.import_csv('19281OqG_UfOPL43QsbfvSa6zGK1b0IvaNZfpMam_vQk', content) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment