get excel row count

PHOTO EMBED

Tue Dec 14 2021 01:57:16 GMT+0000 (Coordinated Universal Time)

Saved by [deleted user]

from openpyxl import load_workbook

wb = load_workbook(excel_path, read_only=True)
sheet = wb[sheet_name]

row_count = sheet.max_row
content_copyCOPY

https://stackoverflow.com/questions/13377793/is-it-possible-to-get-an-excel-documents-row-count-without-loading-the-entire-d