Clear cells
Clears the value in cells
- Parameters
- Advanced call ?
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
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
Token = "ya29.a0ATi6K2sWW_31WLH0d9aK0qk0HJ-UfyvZDcLeBbF5bLU7QH09Bx2pXAupIw40USQVaxXqsovItVSt9swWuPdBDSA0eFaVPE0CbaU2OLQlyrnITI1VVXgZ_Gx2R...";
Spreadsheet = "1hAKnTEvhiX-_-fYfXXYthJ3xq6Ub4SrlLPaIg0Tb9fs";
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 "1Dz51_uVHvmmRAOoPNLcfEV3Xzp9PoJTxAPQhrTFSdd0" \
--cells "['B2','A3','B4']" \
--sheetname "Sheet2"
oint gsheets ClearCells ^
--token "***" ^
--spreadsheet "1Dz51_uVHvmmRAOoPNLcfEV3Xzp9PoJTxAPQhrTFSdd0" ^
--cells "['B2','A3','B4']" ^
--sheetname "Sheet2"
Result
{
"spreadsheetId": "1Dz51_uVHvmmRAOoPNLcfEV3Xzp9PoJTxAPQhrTFSdd0",
"clearedRanges": [
"Sheet2!B2",
"Sheet2!A3",
"Sheet2!B4"
]
}