0

Using V4 of the Google Sheets API in Java. I'm trying to loop through the sheet reading off data, but am getting exceptions when I try to pull out a range that goes past the number of rows added to my sheet.

I can't find anything in their API that tell me what the last row and last column added to my sheet are.

AfterWorkGuinness
  • 1,780
  • 4
  • 28
  • 47
  • Check the answer provided in [this thread](http://stackoverflow.com/questions/38607775/finding-last-written-row-in-google-spreadsheet-api). – ReyAnthonyRenacia Apr 27 '17 at 12:44
  • ^ Doesn't work for me. If my sheet has 1,000 rows and I request range A1:B1005, I get an exception. I could parse the exception message to see the max number of rows in my sheet, but would prefer if there were an API option for this. Is there? – AfterWorkGuinness May 10 '17 at 14:39
  • This worked for me: http://stackoverflow.com/questions/37331756/google-sheets-api-v4-how-to-get-the-last-row-with-value – AfterWorkGuinness May 10 '17 at 20:15

0 Answers0