Skip to main content

Delete sheet

Deletes a sheet from the spreadsheet

Function DeleteSheet(Val Token, Val Spreadsheet, Val Sheet) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Spreadsheet--spreadsheetStringSpreadsheet identifier
Sheet--sheetStringIdentifierOfSheetToDelete

Returns: Map Of KeyAndValue - serialized JSON response from Google


1C:Enterprise/OneScript code example
    Token       = "ya29.a0ARW5m7702-Ib_bOq69krqD5iUx89SC2lxGPxRJoBjqvSBqE7uKghOyAjwrL7ebNf6xqPzwD4wQfZlFvBrb7QsWlw5PGW_SvkFr57Y8Js...";
Spreadsheet = "1DoHoA-PGU3xsThA9Uh_rb_oHNpCXhKH0DkirmHTIo9I";
Sheet = "597986737";

Result = OPI_GoogleSheets.DeleteSheet(Token, Spreadsheet, Sheet);
    oint gsheets DeleteSheet \
--token "***" \
--spreadsheet "1hi4khP9WsocSCTV4SC2ZBjjFUQS15aF8hO_aXVhz3z4" \
--sheet "1359473928"
Result
{
"spreadsheetId": "1psqJkXdtlHOc7Qzr4ficNkFth5dWLl0HdmMDhSTM7ZQ",
"replies": [
{}
]
}