burnash/gspread: Google Spreadsheets Python API
https://github.com/burnash/gspread
提供了一些 feature 來操作 google spreedsheets
Manage your spreadsheets with gspread in Python.
Features:
- Open a spreadsheet by its title or url.
- Extract range, entire row or column values.
- Independent of Google Data Python client library.
- Python 3 support.
exceptions.SpreadSheetNotFound
的問題
往往可能是漏了一步,這個步驟在使用 google 的 service 很常遇到。
- Go to Google Sheets and share your spreadsheet with an email you have in your
json_key['client_email']
. Otherwise you’ll get aSpreadsheetNotFound
exception when trying to open it.
這樣你才能用 OAuth Credentials 來操作這個 spreadsheet
ref
Using OAuth2 for Authorization — gspread 0.3.0 documentation
沒有留言:
張貼留言