导入gspread 来自oauth2client.service_帐户导入ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds']
creds = ServiceAccountCredentials.from_json_keyfile_name('PythonGspread-c6fb2247fb25.json', scope)
client = gspread.authorize(creds)
sheet = client.open("Python").sheet1
list_of_hashes = sheet.get_all_records()
'结果=工作表单元格(2,1).值'
print(list_of_hashes)
print("\n")
print(result)
input("Press enter to exit ;)")
尝试将范围更改为:
我解决了上面的问题。在
新问题正在
gspread.exceptions.APIError: {
"error": {
"errors": [
{
"domain": "global",
"reason": "insufficientPermissions",
"message": "Insufficient Permission"
}
],
"code": 403,
"message": "Insufficient Permission" }
}
我已经分享了电子表格与电子邮件提供的电子邮件在凭证。在
相关问题 更多 >
编程相关推荐