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.a0AcM612wmWdggP-K6tOc3UqW0KxYMjUi60_Uhu-ERltTaavHGbML0nRBXqkuiBcr0GNmR_1gHKowaF1Rd_4Q5Amc9O23DEBZ95sNEGnpR5...";
Spreadsheet = "1fktk0k_rOszr4c3t89Z1KXXSsRWPU0fFPgLImiN-MzI";
Sheet = "1012546035";

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