Google Sheets 文档可以包含一些工作表。首先是默认值和'0'。通常对于任何工作表都有这样的地址:
https://docs.google.com/spreadsheets/d/(spreadsheetId)/edit#gid=(sheetId)
与spreadsheetId和sheetId。
但是在API 文档中没有提到如何使用sheetId. 我只能阅读和编辑给定的默认工作表spreadsheetId。
如果在request示例链接中显示的代码中,我添加了sheetId属性,则出现错误:
{
message: 'Invalid JSON payload received. Unknown name "sheetId": Cannot bind query parameter. Field \'sheetId\' could not be found in request message.',
domain: 'global',
reason: 'badRequest'
}
Run Code Online (Sandbox Code Playgroud)
如何访问 Google Sheets API 中默认值以外的其他工作表并读取或更新其中的字段?