Add sheet
Adds a new sheet to the spreadsheet
Function AddSheet(Val Token, Val Spreadsheet, Val Name) Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
Token | --token | String | ✔ | Token |
Spreadsheet | --spreadsheet | String | ✔ | Spreadsheet identifier |
Name | --title | String | ✔ | NewSheetName |
Returns: Map Of KeyAndValue - serialized JSON response from Google
1C:Enterprise/OneScript code example
Token = "ya29.a0AQQ_BDTgQbn9c5rXhPK3FCakms_7oKkdIWE1CCQFnSPftb2RxvloVqnYOcnsAKhXrD0Gq8Tz2Kgn5IBXG5E25uksZfvvTtXob-jFcuj_9LZYs9La4HrcFk766...";
Spreadsheet = "16uPAewX6jwjTdyVlE0O8adQngnoCMbUHQ5Ek36-IPaQ";
Name = "TestSheet";
Result = OPI_GoogleSheets.AddSheet(Token, Spreadsheet, Name);
- Bash
- CMD/Bat
oint gsheets AddSheet \
--token "***" \
--spreadsheet "1B6z_e-dcUabYF4ZB0GyymzS_-Xzguwq7NPbLpFq0jdA" \
--title "TestSheet"
oint gsheets AddSheet ^
--token "***" ^
--spreadsheet "1B6z_e-dcUabYF4ZB0GyymzS_-Xzguwq7NPbLpFq0jdA" ^
--title "TestSheet"
Result
{
"spreadsheetId": "1B6z_e-dcUabYF4ZB0GyymzS_-Xzguwq7NPbLpFq0jdA",
"replies": [
{
"addSheet": {
"properties": {
"sheetId": 1265364219,
"title": "TestSheet",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}
}
}
]
}