1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-02 23:27:50 +02:00

54 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-10-15 10:16:04 +03:00
sidebar_position: 3
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-10-15 10:16:04 +03:00
# Copy sheet
Copies a sheet from one spreadsheet to another
`Function CopySheet(Val Token, Val From, Val Target, Val Sheet) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Token | --token | String | ✔ | Token |
| From | --from | String | ✔ | Source spreadsheet ID |
| Target | --to | String | ✔ | Destination spreadsheet ID |
| Sheet | --sheet | String | ✔ | CopiedSheetID |
2024-10-15 10:16:04 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Google
<br/>
```bsl title="Code example"
Token = "ya29.a0AcM612zdAe2M8Ywdxt7xmK1VAAj2m3yjTdP1Ap8cFmqbE8lVngjIAujPtjc_c94MCuKNLfn7MSssBd6NfMXDQDrHMUv7Fgjp7cjuXk68n...";
From = "1ybexzLz6S_cthsQNdMkNbOlAD3yjFzdArRm_589T_FQ";
Target = "1WBgDTXbFwMmu1pOOxkej3eD-fx3KQ9kiQ0Np5B2oeMY";
Sheet = "1710472523";
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
```
```json title="Result"
{
"sheetId": 1272386935,
"title": "Sheet1 (копия)",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}
```