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.a0AeXRPp7yIYtWir0wC7l09O27fzCyaFxBylix9NPJ_QNA1wB4QVUrG4U7Fr2QSwtfnWG7ZYf6VNrnekZ-jXtryEWp_DVIDnn_y8ABtqeWr...";
From = "1T55Z5j62InVg9_3GgjDXccDBqRoyF7wXIB4ju3tIu_8";
Target = "1n3ZX0EbySYyqwK_5H-lPTa2HVKpleYXtGY7r2MWQmJs";
Sheet = "1368447649";
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
- Bash
- CMD/Bat
oint gsheets CopySheet \
--token "***" \
--from "1W3QjVx45mTWS3KUSWL_SWMkSPY3w9Yy5EHEZU8h9Qqc" \
--to "13USMeTIPzXaR06AFdUvXSKUBhL8qxsayFr-lK46uIzA" \
--sheet "335236080"
oint gsheets CopySheet ^
--token "***" ^
--from "1W3QjVx45mTWS3KUSWL_SWMkSPY3w9Yy5EHEZU8h9Qqc" ^
--to "13USMeTIPzXaR06AFdUvXSKUBhL8qxsayFr-lK46uIzA" ^
--sheet "335236080"
Result
{
"sheetId": 1272386935,
"title": "Sheet1 (копия)",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}