Google Sheets API V4 - Autofill Error - No grid with id: 0

孤人 提交于 2019-12-25 12:04:20

问题


I am trying to make an AutoFillRequest using a SourceAndDestination object to describe the area to autofill. I've tested autofill requests using a GridRange object and everything works fine, but can't seem to get the SourceAndDestination working. Here is an example where I'm trying to autofill down the first row for 2 more rows.

HTTP POST

https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:batchUpdate

Request Body

{
  "requests": [
    {
      "autoFill": {
        "sourceAndDestination": {
          "dimension": "ROWS",
          "fillLength": 2,
          "source": {
            "sheetId": 1150108545,
            "endRowIndex": 1,
            "startRowIndex": 0
          }
        },
        "useAlternateSeries": false
      }
    }
  ]
}

The response has an error code 400:

message = "Invalid requests[0].autoFill: No grid with id: 0" status = "INVALID_ARGUMENT"


回答1:


Sorry about that, this was a bug on the server. It's now fixed, so the above should work.



来源:https://stackoverflow.com/questions/43395032/google-sheets-api-v4-autofill-error-no-grid-with-id-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!