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
.
More Related Contents:
- Editing workbooks with rich text in openpyxl
- Pandas: Looking up the list of sheets in an excel file
- How to concatenate three excels files xlsx using python?
- How to copy worksheet from one workbook to another one using openpyxl?
- Is there a way to auto-adjust Excel column widths with pandas.ExcelWriter?
- how to write to a new cell in python using openpyxl
- Python openpyxl data_only=True returning None
- Insert row into Excel spreadsheet using openpyxl in Python
- openpyxl load_workbook() on a legit .xlsx file leads to a zipfile.BadZipFile error
- Get cell color from .xlsx
- How to write to an existing excel file without breaking formulas with openpyxl?
- Openpyxl max_row and max_column wrongly reports a larger figure
- Setting styles in Openpyxl
- Using Pandas to pd.read_excel() for multiple worksheets of the same workbook
- Read Excel cell value and not the formula computing it -openpyxl
- Driving Excel from Python in Windows
- check if a file is open in Python
- Import multiple excel files into python pandas and concatenate them into one dataframe
- python xlrd unsupported format, or corrupt file.
- How to access the real value of a cell using the openpyxl module for python
- Openpyxl 1.8.5: Reading the result of a formula typed in a cell using openpyxl
- How to write/update data into cells of existing XLSX workbook using xlsxwriter in python
- drop_duplicates not working in pandas?
- Merge rows based on value (pandas to excel – xlsxwriter)
- Write to StringIO object using Pandas Excelwriter?
- python-win32com excel com model started generating errors
- Python Pandas – Read csv file containing multiple tables
- Is it possible to get an Excel document’s row count without loading the entire document into memory?
- Automation Excel from Python
- XlsxWriter object save as http response to create download in Django