0
我使用Python 3運行Pycharm和模塊gspread來讀取我的谷歌驅動器中的谷歌工作表文件。那麼,我已經遵循了這個link關於如何讀取文件的所有步驟。不幸的是,我在下面的代碼還沒有工作。gspread閱讀谷歌工作表文件使用Python 3
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope =['https://docs.google.com/spreadsheets/d/1xnaOZMd2v93tY28h_hsuMnZYXC9YqCfFpQX70lwpN94/edit?usp=sharing']
credentials = ServiceAccountCredentials.from_json_keyfile_name('distech-c1e26e7150b2.json',scope)
gc = gspread.authorize(credentials)
wks = gc.open("POC").sheet1
for temp in wks:
print(temp)
我怎樣才能使用這個模塊閱讀谷歌表格文件球員?非常感謝