I'm trying out Google Sheets API from a Java application. I've accessed the file mentioned in the tutorial but I cannot access any file that I have created on my own.
This is the code I'm using:
String spreadsheetId = /*omitted*/;
String range = "Class Data!A1:B";
ValueRange response = service.spreadsheets().values()
List<List<Object>> values = response.getValues();
Class Data is the name of the sheet in the sample sheet. You should substitute that with the name of the sheet in your spreadsheet. You can see the name of the sheet on the tab near the bottom of the screen. It defaults to
A1:B is the number of rows and columns to read. It is saying to read all data in columns
B from rows
1 to the last row. You should swap that with the rows and columns you want to read in your sheet.