Within my Java application I am creating new Google sheets as follows:
Sheets service = new Sheets.Builder(GoogleNetHttpTransport.newTrustedTransport(), JSON_FACTORY, credential)
.setApplicationName(APPLICATION_NAME)
.build();
SpreadsheetProperties properties = new SpreadsheetProperties();
properties.setTitle("Title");
Spreadsheet export = new Spreadsheet();
export.setProperties(properties);
Spreadsheet response = service.spreadsheets().create(export).execute();
This works, and I can get the sheet ID in the response. Now I would like to know:
- As I am using Service account, I don't see who will be the user creating the spreadsheet.
- I would like to set permissions to "Anyone who has the link", but there seem to be no option for that.