mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-05-27 23:07:37 +02:00
81 lines
1.8 KiB
Plaintext
Vendored
81 lines
1.8 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Add sheet
|
|
Adds a new sheet to the spreadsheet
|
|
|
|
|
|
|
|
`Function AddSheet(Val Token, Val Spreadsheet, Val Name) Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| Token | --token | String | ✔ | Token |
|
|
| Spreadsheet | --spreadsheet | String | ✔ | Spreadsheet identifier |
|
|
| Name | --title | String | ✔ | NewSheetName |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "ya29.a0ARW5m7702-Ib_bOq69krqD5iUx89SC2lxGPxRJoBjqvSBqE7uKghOyAjwrL7ebNf6xqPzwD4wQfZlFvBrb7QsWlw5PGW_SvkFr57Y8Js...";
|
|
Spreadsheet = "1DoHoA-PGU3xsThA9Uh_rb_oHNpCXhKH0DkirmHTIo9I";
|
|
Name = "TestSheet";
|
|
|
|
Result = OPI_GoogleSheets.AddSheet(Token, Spreadsheet, Name);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint gsheets AddSheet \
|
|
--token "***" \
|
|
--spreadsheet "1hi4khP9WsocSCTV4SC2ZBjjFUQS15aF8hO_aXVhz3z4" \
|
|
--title "TestSheet"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint gsheets AddSheet ^
|
|
--token "***" ^
|
|
--spreadsheet "1hi4khP9WsocSCTV4SC2ZBjjFUQS15aF8hO_aXVhz3z4" ^
|
|
--title "TestSheet"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"spreadsheetId": "1psqJkXdtlHOc7Qzr4ficNkFth5dWLl0HdmMDhSTM7ZQ",
|
|
"replies": [
|
|
{
|
|
"addSheet": {
|
|
"properties": {
|
|
"sheetId": 1019462179,
|
|
"title": "TestSheet",
|
|
"index": 2,
|
|
"sheetType": "GRID",
|
|
"gridProperties": {
|
|
"rowCount": 1000,
|
|
"columnCount": 26
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
```
|