openpyxl
A Python library to read/write Excel 2010 xlsx/xlsm files
Install
openpyxl on PyPI
pip
pip install openpyxluv
uv add openpyxlpoetry
poetry add openpyxlPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — et-xmlfile |
| Maintenance | dormant — 776 days since the last release |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: openpyxl-3.1.5-py2.py3-none-any.whl
About openpyxl
from the package's own PyPI description — quoted content, verbatim
.. 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...
Read as markdown · JSON record · Source repository · Homepage · Docs
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
openpyxl reads and writes Excel 2010 xlsx/xlsm/xltx/xltm files natively from Python, allowing you to create, modify, and save spreadsheets programmatically.
Low install friction with a single runtime dependency (et-xmlfile). Dormant maintenance status (776 days since last release) may warrant monitoring for critical updates, though the package is marked Production/Stable.
MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and may modify the code freely.
Usage
pip install openpyxl
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
ws['A1'] = 42
wb.save('sample.xlsx')
Requires Python >=3.8. By default does not guard against XML attacks; install defusedxml separately if processing untrusted files.
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.
Needs verification
- Whether the 776-day gap reflects genuine inactivity or a stable, maintenance-minimal codebase
- Whether defusedxml integration is automatic or requires explicit user configuration
Similar packages
permissive · top 1,000 on PyPI
xlsxwriterpermissive · top 1,000 on PyPI
xlrdpermissive · top 1,000 on PyPI
gspreadpermissive · top 1,000 on PyPI
defusedxmlpermissive · top 1,000 on PyPI
tableauserverclientpermissive · top 1,000 on PyPI
pymupdfagpl · top 1,000 on PyPI
pytest-metadatacopyleft · top 1,000 on PyPI
MarkupSafepermissive · top 100 on PyPI
pymupdf4llmagpl · top 1,000 on PyPI