Clear cells
Clears the value in cells
Function ClearCells(Val Token, Val Spreadsheet, Val CellsArray, Val Sheet = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Token |
Spreadsheet | --spreadsheet | String | ✔ | SpreadsheetID |
CellsArray | --cells | Array of String | ✔ | Array of cells like A1 to be cleared |
Sheet | --sheetname | String | ✖ | Sheet name (first sheet by default) |
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 = "Sheet2";
CellsArray = New Array;
CellsArray.Add("B2");
CellsArray.Add("A3");
CellsArray.Add("B4");
Result = OPI_GoogleSheets.ClearCells(Token, Spreadsheet, CellsArray, Sheet);
- Bash
- CMD/Bat
oint gsheets ClearCells \
--token "***" \
--spreadsheet "1dN30zu99-Z_s0h0XVFANq2SZnfnhrewgLwM71VBIMdQ" \
--cells "['B2','A3','B4']" \
--sheetname "Sheet2"
oint gsheets ClearCells ^
--token "***" ^
--spreadsheet "1dN30zu99-Z_s0h0XVFANq2SZnfnhrewgLwM71VBIMdQ" ^
--cells "['B2','A3','B4']" ^
--sheetname "Sheet2"
Result
{
"spreadsheetId": "1p_i-5lmOKdBEbi88O0SkXq2Q_gG0c4EY7N_wtWGKSCs",
"clearedRanges": [
"Sheet2!B2",
"Sheet2!A3",
"Sheet2!B4"
]
}