【发布时间】:2019-04-23 10:57:45
【问题描述】:
我想从谷歌表格中的注释单元格中访问数据。我已经完成了一些工作,并且能够访问单元格中的值。
from oauth2client.service_account import ServiceAccountCredentials
import json
scope = ['https://spreadsheets.google.com/feeds',
'https://www.googleapis.com/auth/drive']
credentials = ServiceAccountCredentials.from_json_keyfile_name('WorkSheet001-4d8ce6dbd79f.json', scope)
gc = gspread.authorize(credentials)
wks = gc.open_by_url('https://docs.google.com/spreadsheets/d/1ME7WatXOmSEytwu7Qxem-a6BzCew36RKmD7KdhKMwbA/edit#gid=0').sheet1
print(wks.cell(2, 2).value)
print(wks.get_all_records())
我想要来自注释单元格的数据。想要访问时间、日期和单元格上的评论等数据
[{'name': 'Naresh', 'technology': 'Php'}, {'name': 'kuldeep', 'technology': 'python'}]
【问题讨论】:
-
你读过this question and topmost answer for it吗?你是说笔记而不是 cmets?
标签: excel python-3.x google-apps-script google-sheets gspread