Determining the last row in a single column

前端 未结 19 1518
野性不改
野性不改 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:24

    I've used getDataRegion

    sheet.getRange(1, 1).getDataRegion(SpreadsheetApp.Dimension.ROWS).getLastRow()
    

    Note that this relies on the data being contiguous (as per the OP's request).

提交回复
热议问题