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.a0AcM612wmWdggP-K6tOc3UqW0KxYMjUi60_Uhu-ERltTaavHGbML0nRBXqkuiBcr0GNmR_1gHKowaF1Rd_4Q5Amc9O23DEBZ95sNEGnpR5...";
Spreadsheet = "1fktk0k_rOszr4c3t89Z1KXXSsRWPU0fFPgLImiN-MzI";
Name = "TestSheet";
Result = OPI_GoogleSheets.AddSheet(Token, Spreadsheet, Name);
- Bash
- CMD/Bat
oint gsheets AddSheet \
--token "***" \
--spreadsheet "1lNdwweEhK1C1fXq80MLl6-CWAj9y89EJYiUBziOrvhM" \
--title "TestSheet"
oint gsheets AddSheet ^
--token "***" ^
--spreadsheet "1lNdwweEhK1C1fXq80MLl6-CWAj9y89EJYiUBziOrvhM" ^
--title "TestSheet"
Result
{
"spreadsheetId": "1psqJkXdtlHOc7Qzr4ficNkFth5dWLl0HdmMDhSTM7ZQ",
"replies": [
{
"addSheet": {
"properties": {
"sheetId": 1019462179,
"title": "TestSheet",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}
}
}
]
}