skillfed

xlsxwriter

A Python module for creating Excel XLSX files.

xlsxwriter Permissive license BSD-2-Clause Active 3,966 v3.2.9 released

Install

xlsxwriter on PyPI

pip

pip install xlsxwriter

uv

uv add xlsxwriter

poetry

poetry add xlsxwriter

Package facts

License BSD-2-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 331 days since the last release
Last repo commit
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: xlsxwriter-3.2.9-py3-none-any.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About xlsxwriter

from the package's own PyPI description — quoted content, verbatim

XlsxWriter

XlsxWriter is a Python module for writing files in the Excel 2007+ XLSX file format.

XlsxWriter can be used to write text, numbers, formulas and hyperlinks to multiple worksheets and it supports features such as formatting and many more, including:

  • 100% compatible Excel XLSX files.
  • Full formatting.
  • Merged cells.
  • Defined names.
  • Charts.
  • Autofilters.
  • Data validation and drop down lists.
  • Conditional formatting.
  • Worksheet PNG/JPEG/GIF/BMP/WMF/EMF images.
  • Rich multi-format strings.
  • Cell comments.
  • Integration with Pandas and Polars.
  • Textboxes.
  • Support for adding Macros.
  • Memory optimization mode for writing large files.

It supports Python 3.8+ and PyPy3 and uses standard libraries only.

Here is a simple example:

.. code-block:: python

import xlsxwriter

# Create an new Excel file and add a worksheet. workbook = xlsxwriter.Workbook("demo.xlsx") worksheet = workbook.add_worksheet()

# Widen the first column to make the text clearer. worksheet.set_column("A:A", 20)

# Add a bold format to use to highlight cells. bold = workbook.add_format({"bold": True})

# Write some simple text....

Read as markdown · JSON record · Source repository · Homepage

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

XlsxWriter creates Excel 2007+ XLSX files from Python, supporting text, numbers, formulas, charts, formatting, images, and data validation without external dependencies.

Minimal friction: pure Python wheel with zero runtime dependencies, actively maintained with recent release (331 days ago), and supports Python 3.8–3.13.

BSD-2-Clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with only attribution and liability disclaimers required.

Usage

import xlsxwriter

workbook = xlsxwriter.Workbook('demo.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello')
workbook.close()

Verdict: XlsxWriter is a stable, actively maintained library for generating Excel files with no external dependencies. Its permissive BSD license, broad Python version support, and zero-friction installation make it a low-risk choice for spreadsheet generation tasks.

Needs verification

  • Whether memory optimization mode is suitable for your specific large-file use case and what file size thresholds trigger practical benefits.
  • Compatibility details with Pandas and Polars integration beyond the stated support claim.
create excel files pythonxlsx file writerpython excel generationwrite spreadsheets programmaticallyexcel 2007 xlsx creationpython excel formattinggenerate xlsx with charts

Similar packages