---
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 | &#x2714; | Token |
  | From | --from | String | &#x2714; | Source spreadsheet ID |
  | Target | --to | String | &#x2714; | Destination spreadsheet ID |
  | Sheet | --sheet | String | &#x2714; | CopiedSheetID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Google



```bsl title="1C:Enterprise/OneScript code example"
    Token  = "ya29.a0Aa7pCA9fmPZk2eeWvC-VVPtSY4UzLqhBxacbBQw80RgQUw_wRm7_TGYppXdco1mWX6DVhkJklByQ4epXj_yOMf3j0BVPvNq966JHEVow5jOasNoGJdGn27Rq4...";
    From   = "13mnV79E8MBeQkwzcH3RTikriA3VsFKv89RnBkhGeNZA";
    Target = "104DNjQH6em-GAJetD-G3N_rp57fN2R6eWnau0C8mp6A";
    Sheet  = "849342275";

    Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint gsheets CopySheet \
             --token "***" \
             --from "1uDmh-zw-B5_2QHugiFZb2hLhhBULYtn-6owWIuTfzWw" \
             --to "1fZb0YpPq7ehZ31gPNDlhkIlPP2hlKUjJomXsPJwBYuc" \
             --sheet "2144564842"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint gsheets CopySheet ^
             --token "***" ^
             --from "1uDmh-zw-B5_2QHugiFZb2hLhhBULYtn-6owWIuTfzWw" ^
             --to "1fZb0YpPq7ehZ31gPNDlhkIlPP2hlKUjJomXsPJwBYuc" ^
             --sheet "2144564842"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "sheetId": 1633432481,
 "title": "Sheet1 (копия)",
 "index": 2,
 "sheetType": "GRID",
 "gridProperties": {
  "rowCount": 1000,
  "columnCount": 26
 }
}
```
