A1表示法V4。无法访问具有指定名称的工作表

时间:2016-11-28 17:29:15

标签: google-sheets-api

为名称为'][_('

的工作表创建范围请求的正确方法是什么

我收到错误:

curl 'https://sheets.googleapis.com/v4/spreadsheets/1fAdl80klrzQtPVu-ZJE4qcYhlPippj96xaQFpr3OE2k/values/"%5D%5B(_"!1:1?majorDimension=ROWS&valueRenderOption=UNFORMATTED_VALUE' -H 'Authorization: Bearer mytoken'

{
    "error": {
      "code": 400,
      "message": "Unable to parse range: \"][(_\"!1:1",
      "status": "INVALID_ARGUMENT"
    }
}

1 个答案:

答案 0 :(得分:0)

GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheet_id}/values/'%5D%5B_('!1:1

GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheet_id}/values/%5D%5B_(!1:1

除了使用单引号或无引号外,基本上就是上面的内容。双引号不支持围绕工作表名称。

通过使用API Explorer并插入您想要的值,您可以在将来找到自己的内容 - 它会吐出正确的URL编码的GET请求。