1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-04-15 11:56:36 +02:00

56 lines
1.3 KiB
Markdown
Raw Normal View History

---
sidebar_position: 3
---
2024-06-08 13:46:25 +03:00
# Copy sheet
Copies a sheet from one spreadsheet to another
2024-07-10 13:58:29 +03:00
`Function CopySheet(Val Token, Val From, Val Target, Val Sheet) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Token |
| From | --from | String | Source spreadsheet ID |
| Target | --to | String | Destination spreadsheet ID |
| Sheet | --sheet | String | CopiedSheetID |
Returns: Map Of KeyAndValue - serialized JSON response from Google
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-29 19:41:20 +03:00
Token = "ya29.a0AcM612xw6IRwwkQIOEhizd2pJ6LLI4UAhdhxmXDGEzYkcfUPrLYgDDwbsSi5iQdc78WPs_1_Qor5KipuV6mAIvr6z-AKzrBaMT4erIR5T...";
From = "1IIUxPvgvrPCB92SXFISbKBFLAbmbHUIu_OysyC9w3Ow";
Target = "1p_TOtMYpcf_KGyUs2W44df1vAL-faoQnqW02GiT4qlA";
Sheet = "1572277025";
2024-09-29 00:25:48 +03:00
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
```
```sh title="CLI command example"
oint gsheets CopySheet --token %token% --from "1Pu07Y5UiGVfW4fqfP7tcSQtdSX_2wdm2Ih23zlxJJwc" --to "1tPDQHmduH9NASRhy0I-a6--ebNNJ5A6wXhhTRcNhD7s" --sheet "25093199"
```
```json title="Result"
2024-09-29 21:40:58 +03:00
{
"sheetId": 1468201785,
"title": "Sheet1 (копия)",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}
```