var spreadsheet = Spreadsheet() .setProperties( SpreadsheetProperties() .setTitle("CreateNewSpreadsheet") )// need to run in background threadspreadsheet = service.spreadsheets().create(spreadsheet).execute()Timber.d("ID: ${spreadsheet.spreadsheetId}")
NOTE: service
is Sheets. Refer to Setup Google Sheets API for Android (Java/Kotlin) to get service
/Sheets
instance.