Search code examples
google-docs-apigoogle-sheets-api

How can I get the number of rows in a Google Spreadsheet using api?


Is it possible to fetch the number of filled rows without fetching the whole spreadsheet, or find the first empty row number?

I am using the python api wrapper if it matters.


Solution

  • The main google API docs say you can do it using the WorksheetFeed. So must be possible from python.

    Google Data APIs Client Library https://developers.google.com/gdata/javadoc/com/google/gdata/data/spreadsheet/WorksheetFeed (updated link 2021/10/31)

    Edit: @alvaro nortes correctly pointed out the link is broken. Update the link.