skillfed

openpyxl

A Python library to read/write Excel 2010 xlsx/xlsm files

openpyxl Permissive license MIT DORMANT v3.1.5 released

Install

openpyxl on PyPI

pip

pip install openpyxl

uv

uv add openpyxl

poetry

poetry add openpyxl

Package 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

Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

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
read write excel files pythonxlsx xlsm manipulation libraryexcel spreadsheet automationoffice open xml pythoncreate excel workbooks programmaticallypython excel file parserxlsx file handling

Similar packages