0

我试图做一个AutoFillRequest使用SourceAndDestination对象来描述自动填充区域。我已经使用GridRange对象测试了自动填充请求,并且一切正常,但似乎无法使SourceAndDestination正常工作。这里是一个例子,我试图自动填充第一行另外两行。Google表格API V4 - 自动填充错误 - 没有网格ID:0

HTTP POST

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

请求体

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

的响应具有一个错误代码400:

消息=“无效请求[0] .autoFill :无网格ID:0“状态= “INVALID_ARGUMENT”

回答

2

对不起,这是服务器上的一个错误。它现在已经修复了,所以上面应该可以工作。

+1

@StevenMortimer - 我忘了确切的修补时间,但原来的代码现在应该工作。 –