--- id: openpyxl version: "3.1.5" license: MIT license_treatment: permissive maintenance: dormant --- # openpyxl — A Python library to read/write Excel 2010 xlsx/xlsm files License: permissive · Maintenance: dormant · Popularity: top 1,000 on PyPI ## Install pip install openpyxl uv add openpyxl poetry add openpyxl ## Description .. image:: https://coveralls.io/repos/bitbucket/openpyxl/openpyxl/badge.svg?branch=default :target: https://coveralls.io/bitbucket/openpyxl/openpyxl?branch=default :alt: coverage status Introduction ------------ openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files. It was born from lack of existing library to read/write natively from Python the Office Open XML format. All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel. Security -------- By default openpyxl does not guard against quadratic blowup or billion laughs xml attacks. To guard against these attacks install defusedxml. Mailing List ------------ The user list can be found on http://groups.google.com/group/openpyxl-users Sample code:: from openpyxl import Workbook wb = Workbook() # grab the active worksheet ws = wb.active # Data can be assigned directly to cells ws['A1'] = 42 # Rows can also be appended ws.append([1, 2, 3]) # Python types will automatically be converted import datetime ws['A2'] = datetime.datetime.now() # Save the file wb.save("sample.xlsx") Documentation ------------- The... ## AI interpretation — verify before relying openpyxl reads and writes Excel 2010 xlsx/xlsm/xltx/xltm files natively from Python, allowing you to create, modify, and save spreadsheets programmatically. Verdict: openpyxl is a stable, widely-used library for Excel file handling with permissive licensing and low install friction. Dormant maintenance (no release in 776 days) is a consideration for long-term projects, but no known vulnerabilities are recorded and it supports current Python versions through 3.11. [View on SkillFed](https://skillfed.io/packages/openpyxl) · [View on PyPI](https://pypi.org/project/openpyxl/)