You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2026-05-22 10:05:29 +02:00
78 lines
1.9 KiB
Plaintext
78 lines
1.9 KiB
Plaintext
---
|
|
sidebar_position: 2
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# 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
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "ya29.a0AeDClZCVfxXCE-JAcPJed8p82WT_K0Jtttw0mCwT02IVORX3qB2e7AM-8OQCJa8ImTUNCA5F--f_CULx1mArjs-Se30Fonbdtroe7NaOe...";
|
|
Spreadsheet = "1sop204zegJKdSBspxzJHBlGoaCa05__9cT7ivebrAwQ";
|
|
Sheet = "Sheet2";
|
|
|
|
CellsArray = New Array;
|
|
CellsArray.Add("B2");
|
|
CellsArray.Add("A3");
|
|
CellsArray.Add("B4");
|
|
|
|
Result = OPI_GoogleSheets.ClearCells(Token, Spreadsheet, CellsArray, Sheet);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint gsheets ClearCells \
|
|
--token "***" \
|
|
--spreadsheet "1Fdxm8RQAiGfr30TI7pqVvVs5HpLlyjygP9iPardXQzc" \
|
|
--cells "['B2','A3','B4']" \
|
|
--sheetname "Sheet2"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint gsheets ClearCells ^
|
|
--token "***" ^
|
|
--spreadsheet "1Fdxm8RQAiGfr30TI7pqVvVs5HpLlyjygP9iPardXQzc" ^
|
|
--cells "['B2','A3','B4']" ^
|
|
--sheetname "Sheet2"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"spreadsheetId": "1p_i-5lmOKdBEbi88O0SkXq2Q_gG0c4EY7N_wtWGKSCs",
|
|
"clearedRanges": [
|
|
"Sheet2!B2",
|
|
"Sheet2!A3",
|
|
"Sheet2!B4"
|
|
]
|
|
}
|
|
```
|