Google Sheets API v4 - How to get the last row with value?
How to get the last row with value in the new Google Sheets API v4 ? i use this to get a range from a sheet: mService.spreadsheets().values().get("ID_SHEET", "Sheet1!A2:B50").execute(); how to detect the last row with value in the sheet ? You can set the range to "A2:D" and this would fetch as far as the last data row in your sheet. I managed to get it by counting the total rows from current Sheets. Then append the data to the next row. rowcount = this.mService.spreadsheets().values().get(spreadsheetId, range).execute().getValues().size() You don't need to. Set a huge range (for example A2