Skip to content

Instantly share code, notes, and snippets.

@lamegaton
Last active September 16, 2020 16:43
Show Gist options
  • Save lamegaton/4a9759a47bda483756115a000811d3a5 to your computer and use it in GitHub Desktop.
Save lamegaton/4a9759a47bda483756115a000811d3a5 to your computer and use it in GitHub Desktop.
<?php
$requestBody = new Google_Service_Sheets_BatchUpdateSpreadsheetRequest(array(
'requests' => array(
'deleteDimension' => array(
'range' => array(
'sheetId' => 0,
'dimension' => "ROWS",
'startIndex' => $rowtodelete, // row number to delete
'endIndex' => $rowtodelete + 1
)
)
)
));
$response = $service->spreadsheets->batchUpdate($spreadsheetId, $requestBody);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment