Search in sources :

Example 1 with AddSheetRequest

use of com.google.api.services.sheets.v4.model.AddSheetRequest in project collect by opendatakit.

the class SheetsHelper method addSheet.

public void addSheet(String spreadsheetId, String sheetName) throws IOException {
    AddSheetRequest addSheetRequest = new AddSheetRequest();
    addSheetRequest.setProperties(new SheetProperties().setTitle(sheetName));
    Request request = new Request();
    request.setAddSheet(addSheetRequest);
    sheetsService.batchUpdate(spreadsheetId, Collections.singletonList(request));
}
Also used : AddSheetRequest(com.google.api.services.sheets.v4.model.AddSheetRequest) SheetProperties(com.google.api.services.sheets.v4.model.SheetProperties) AddSheetRequest(com.google.api.services.sheets.v4.model.AddSheetRequest) BatchUpdateSpreadsheetRequest(com.google.api.services.sheets.v4.model.BatchUpdateSpreadsheetRequest) UpdateSpreadsheetPropertiesRequest(com.google.api.services.sheets.v4.model.UpdateSpreadsheetPropertiesRequest) Request(com.google.api.services.sheets.v4.model.Request) UpdateSheetPropertiesRequest(com.google.api.services.sheets.v4.model.UpdateSheetPropertiesRequest)

Aggregations

AddSheetRequest (com.google.api.services.sheets.v4.model.AddSheetRequest)1 BatchUpdateSpreadsheetRequest (com.google.api.services.sheets.v4.model.BatchUpdateSpreadsheetRequest)1 Request (com.google.api.services.sheets.v4.model.Request)1 SheetProperties (com.google.api.services.sheets.v4.model.SheetProperties)1 UpdateSheetPropertiesRequest (com.google.api.services.sheets.v4.model.UpdateSheetPropertiesRequest)1 UpdateSpreadsheetPropertiesRequest (com.google.api.services.sheets.v4.model.UpdateSpreadsheetPropertiesRequest)1