且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Google Sheets API v4 - 如何在具有值的最后一行之后插入行?

更新时间:2022-12-12 14:50:55

v4 API没有办法问数据的最后一行是什么,因为它与Apps Script API不同的API风格。您可以通过请求数据并计算从第一个请求行到最后一个返回行的偏移量来自行推断最后一行。

The v4 API has no way to ask "what is the last row with data", as it's a different style of API than the Apps Script API. You can infer the last row yourself by requesting the data and counting the offset from your first requested row to the last returned row.