You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-12-24 00:01:24 +02:00
78 lines
2.2 KiB
Plaintext
Vendored
78 lines
2.2 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 3
|
|
description: Copy sheet and other functions to work with Google Sheets in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Google Sheets]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Copy sheet
|
|
Copies a sheet from one spreadsheet to another
|
|
|
|
|
|
|
|
`Function CopySheet(Val Token, Val From, Val Target, Val Sheet) Export`
|
|
|
|
| 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 |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Google
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
Token = "ya29.A0AS3H6NzZhuWUBt5SK1krSUXDl1PlvawSraabkJU9I1Cd9GMbnXV194GtRveLkzC4TFqpg8CjFqwe1CqV-EEU-3BxUGa8srNcXC58Ie1LQOpjFZeSJWCMv7jAn...";
|
|
From = "1UQ50_7Akaz0ZfChNPjy1eaPfib19NymIVwPGEKGp5oM";
|
|
Target = "1Bvrd2KtuH2L7dIgiKYBMHbfwdyBnctdm7zGt4lwdKC8";
|
|
Sheet = "1422092643";
|
|
|
|
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint gsheets CopySheet \
|
|
--token "***" \
|
|
--from "13PLBUcAt_rPkyEb1LALon3AvImfib0TroXbM9HAwFq8" \
|
|
--to "1qW-3xNYXLUe0CTqJdF376-XYMmLf-Tjq0Nwtpc4rnjE" \
|
|
--sheet "1412159203"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint gsheets CopySheet ^
|
|
--token "***" ^
|
|
--from "13PLBUcAt_rPkyEb1LALon3AvImfib0TroXbM9HAwFq8" ^
|
|
--to "1qW-3xNYXLUe0CTqJdF376-XYMmLf-Tjq0Nwtpc4rnjE" ^
|
|
--sheet "1412159203"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"sheetId": 1272386935,
|
|
"title": "Sheet1 (копия)",
|
|
"index": 2,
|
|
"sheetType": "GRID",
|
|
"gridProperties": {
|
|
"rowCount": 1000,
|
|
"columnCount": 26
|
|
}
|
|
}
|
|
```
|