How to find the last row in a column using openpyxl normal workbook?

ws.max_row will give you the number of rows in a worksheet.

Since version openpyxl 2.4 you can also access individual rows and columns and use their length to answer the question.

len(ws['A'])

Though it’s worth noting that for data validation for a single column Excel uses 1:1048576.

Leave a Comment