Creating a sheet with more than 1000 rows
<p>I am trying to create a Google Sheet with more than 1000 rows and am receiving the error:</p>

<pre><code>{
  "error": {
    "code": 400,
    "message": "Invalid sheets[0].data[0]: Attempting to write row: 1000, beyond the last requested row of: 999",
    "errors": [
      {
        "message": "Invalid sheets[0].data[0]: Attempting to write row: 1000, beyond the last requested row of: 999",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}
</code></pre>

<p>I also tried creating an empty sheet, and then running batch update calls with GridRanges.</p>

<pre><code>$range = new Google_Service_Sheets_GridRange();
$range-&gt;setSheetId($sheetId);
$range-&gt;setStartRowIndex(0);
$range-&gt;setEndRowIndex(sizeof($data));
$range-&gt;setStartColumnIndex(0);
$range-&gt;setEndColumnIndex(sizeof(array_keys($data[0])));

$cellsRequest = new Google_Service_Sheets_UpdateCellsRequest();
$cellsRequest-&gt;setFields('*');
$cellsRequest-&gt;setRange($range);
$cellsRequest-&gt;setRows($rowDataArray);

$request = new Google_Service_Sheets_Request();
$request-&gt;setUpdateCells($cellsRequest);

$batchUpdate = new Google_Service_Sheets_BatchUpdateSpreadsheetRequest();
$batchUpdate-&gt;setRequests(array($request));
$result = $service-&gt;spreadsheets-&gt;batchUpdate($documentId, $batchUpdate);
</code></pre>

<p>When that didn't work, I tried UpdateCellRequests with ranges that were 1000 records in size. That gave me this error: </p>

<pre><code>{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unknown name \"update_cells\" at 'requests[0]': Proto field is not repeating, cannot start list.",
    "errors": [
      {
        "message": "Invalid JSON payload received. Unknown name \"update_cells\" at 'requests[0]': Proto field is not repeating, cannot start list.",
        "domain": "global",
        "reason": "badRequest"
      }
    ],
    "status": "INVALID_ARGUMENT"
  }
}
</code></pre>

<p>Any help on where to go from here would be great!</p>

<p>Thank you.</p>