如何使用Sheets API從Google表格訪問python中的電子表格文檔? 我正在嘗試訪問我的Google帳戶中的文檔。那麼請問API密鑰是否足夠,或者我們應該使用Oauth2client?使用Google API在Python中訪問電子表格
0
A
回答
0
您可以使用OAuth2流程。憑證將存儲在您的client_secret.json中。該程序詳見Python Quickstart Sheets API指南。
Step 1:打開谷歌API表
Step 2:安裝谷歌客戶端庫
Step 3:設置樣品
1
您可以嘗試使用該庫Gspread訪問谷歌電子表格。您可以使用命令來安裝gspread
pip install gspread
或
pip install https://github.com/burnash/gspread/archive/master.zip
我已經寫上how to access google sheets in python using gspread詳細的博客。這可能會幫助你。