Search code examples
google-apps-scriptgoogle-sheetsrow

How can I get the end row of my sheet (not the last row with data) in Google Sheets Scripts?


I would like to know how can I get the end row of my sheet (not the last row with data). Is there a simple code to get that?


Solution

  • Solution:

    You can use getMaxRows() to get the end row number.

    Sample:

    enter image description here

    enter image description here

    Reference:

    getMaxRows()