【发布时间】:2020-07-01 14:35:02
【问题描述】:
以下问题和解决方案,how to reset all rows and column data uisng python gspread sheets, 我有以下确切代码
requests = {"requests": [{"updateCells": {"range": {"sheetId": worksheet._properties['sheetId']}, "fields": "*"}}]}
res = spreadsheet.batch_update(requests)
但我收到以下错误
File "/root/.local/lib/python3.8/site-packages/gspread/models.py", line 1171, in batch_update data = [ File "/root/.local/lib/python3.8/site-packages/gspread/models.py", line 1172, in <listcomp> dict(vr, range=absolute_range_name(self.title, vr['range'])) TypeError: string indices must be integers
谁有过这种经历?你是怎么解决的?
【问题讨论】:
-
关于your this comment,我在这里找到了你的问题。所以我想提出修改后的脚本作为答案。你能确认一下吗?
标签: python python-3.x google-sheets google-sheets-api gspread