Google Sheets API v4 - 如何获取最后一行的值?
问题描述:
如何在新的 Google Sheets API v4 中获取带有值的最后一行?
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 ?
答
您可以将范围设置为A2:D",这将获取到工作表中的最后一行数据.
You can set the range to "A2:D" and this would fetch as far as the last data row in your sheet.