Skip to main content

Add sheet

Adds a new sheet to the spreadsheet

Function AddSheet(Val Token, Val Spreadsheet, Val Name) Export

ParameterCLI optionTypeRequiredDescription
Token--tokenStringToken
Spreadsheet--spreadsheetStringSpreadsheet identifier
Name--titleStringNewSheetName

Returns: Map Of KeyAndValue - serialized JSON response from Google


1C:Enterprise/OneScript code example
    Token       = "ya29.a0ARW5m7702-Ib_bOq69krqD5iUx89SC2lxGPxRJoBjqvSBqE7uKghOyAjwrL7ebNf6xqPzwD4wQfZlFvBrb7QsWlw5PGW_SvkFr57Y8Js...";
Spreadsheet = "1DoHoA-PGU3xsThA9Uh_rb_oHNpCXhKH0DkirmHTIo9I";
Name = "TestSheet";

Result = OPI_GoogleSheets.AddSheet(Token, Spreadsheet, Name);
    oint gsheets AddSheet \
--token "***" \
--spreadsheet "1hi4khP9WsocSCTV4SC2ZBjjFUQS15aF8hO_aXVhz3z4" \
--title "TestSheet"
Result
{
"spreadsheetId": "1psqJkXdtlHOc7Qzr4ficNkFth5dWLl0HdmMDhSTM7ZQ",
"replies": [
{
"addSheet": {
"properties": {
"sheetId": 1019462179,
"title": "TestSheet",
"index": 2,
"sheetType": "GRID",
"gridProperties": {
"rowCount": 1000,
"columnCount": 26
}
}
}
}
]
}