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
1C:Enterprise/OneScript code example
Token = "ya29.a0AZYkNZiCaf3vW8I05cl_i6pLKCRWSjff1YhC7Yi0SgLO50zysjwrX_9QPi1WejmqgGdFjcbaOJKsPO3tvT7gB712mg1gxgxiL1pCUVthx...";
From = "1mPXsdn2dQXSGxubILyd2DWJlqqaF6t3m4AlmgWsHOP4";
Target = "15xr35y6_YNPNXa5gHefxEqT3M18BrCS7Vpnqmc0eGRE";
Sheet = "545515306";
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
- Bash
- CMD/Bat
oint gsheets CopySheet \
--token "***" \
--from "1XIOcE7gbAiFCAIyn9MSXVDidnAl2srekbBp7APj25bA" \
--to "1ti5hoBTxJQrqh12jcYcGAXic2ULj1iVnj65ggcoVBZ4" \
--sheet "1541421450"
oint gsheets CopySheet ^
--token "***" ^
--from "1XIOcE7gbAiFCAIyn9MSXVDidnAl2srekbBp7APj25bA" ^
--to "1ti5hoBTxJQrqh12jcYcGAXic2ULj1iVnj65ggcoVBZ4" ^
--sheet "1541421450"
Result
{
"sheetId": 1272386935,
"title": "Sheet1 (копия)",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}