Determining the last row in a single column

前端 未结 19 1322
野性不改
野性不改 2020-11-22 10:46

I have a sheet with data in cols A through H.

I need to determine the last row in column A that contains data (it\'s all conti

19条回答
  •  逝去的感伤
    2020-11-22 11:12

    To get the number of columns or last column's index:

    var numColumns = sheet.getLastColumn()
    

    To get the no of rows or last row's index:

    var numRows = sheet.getLastRow()
    

    where

    var sheet = SpreadsheetApp.getActiveSheet()
    

提交回复
热议问题