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.a0AW4XtxhtghlL7aK7VhJX0jOgNWau4CUoOEDkQBr4uJEjPidCjKm-4r4l7AoJnODBt7yblowJtvv_3vETd6CulW4V5zxxPx8TTvQAMESj7...";
From = "15pyer8RapTluc4feiD8_y1P42RVoDG5xBDly6IPC-OE";
Target = "1XwySCwIIO7fVoyIIj2pG72Q07HYRLhZMMqyAIIupddc";
Sheet = "48778352";
Result = OPI_GoogleSheets.CopySheet(Token, From, Target, Sheet);
- Bash
- CMD/Bat
oint gsheets CopySheet \
--token "***" \
--from "1oGXEhvP6doUZw06a8nilumExYGjJ9hti1OlRerUngCg" \
--to "1BbrgeJfE3k0V87L5c_TrtEISQGiEgMyO05GodrT79Ck" \
--sheet "1552525689"
oint gsheets CopySheet ^
--token "***" ^
--from "1oGXEhvP6doUZw06a8nilumExYGjJ9hti1OlRerUngCg" ^
--to "1BbrgeJfE3k0V87L5c_TrtEISQGiEgMyO05GodrT79Ck" ^
--sheet "1552525689"
Result
{
"sheetId": 1272386935,
"title": "Sheet1 (копия)",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}