skillfed

xlwt

Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+

xlwt v1.3.0 12.1M downloads/30d#1,345 on PyPI
Permissive license BSD Abandoned released

What it is and what it does

xlwt is a pure-Python library for writing Microsoft Excel spreadsheets in the XLS format (Excel 97–2003). It provides a straightforward API to create workbooks, add sheets, write cells with formatting, and save files—all without requiring external C libraries or system dependencies. The package includes styling support (fonts, colors, number formats) and formula generation.

The library has been in production/stable status since its initial release but has not been actively maintained since 2017. It is designed for legacy Excel compatibility and does not support the modern XLSX format. For projects targeting current Excel versions or requiring ongoing maintenance and updates, this package should be considered end-of-life.

Use it for:

  • Generate legacy XLS reports from Python scripts in environments where Excel 97–2003 format is required or expected.
  • Export tabular data to XLS files with basic cell styling (fonts, colors, number formatting) without external dependencies.
  • Build batch spreadsheet generation tools for older enterprise systems that do not accept XLSX or other modern formats.
  • Create simple financial or business reports with formulas and formatted cells in the XLS format.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates Microsoft Excel 97–2003 XLS spreadsheet files from Python code with no external dependencies.

No, unless you are maintaining legacy code that specifically requires XLS output and cannot be migrated. The package is abandoned and will not receive security updates or compatibility fixes. For new projects, use a maintained alternative that supports XLSX (the modern Excel standard). If you must generate XLS files, xlwt works but carries the risk of unpatched bugs and incompatibility with future Python versions.

Install

xlwt on PyPI

pip

pip install xlwt

uv

uv add xlwt

poetry

poetry add xlwt

Installing xlwt

Before you install

Installation is frictionless—a pure-Python wheel with no runtime dependencies. However, the package has been abandoned since 2017 and receives no maintenance; it will not be updated for modern Python versions or security issues.

License in practice

BSD license is permissive and poses no restrictions on commercial or private use, modification, or redistribution.

Quickstart

pip install xlwt

import xlwt
from datetime import datetime

wb = xlwt.Workbook()
ws = wb.add_sheet('Sheet1')
ws.write(0, 0, 'Hello')
ws.write(1, 0, datetime.now())
wb.save('output.xls')

Targets Excel 97–2003 format (.xls); modern Excel versions prefer .xlsx. Abandoned since 2017; compatibility with current Python versions is not guaranteed.

Verify before relying

  • Current compatibility with Python 3.7+ (classifiers list up to 3.6; last release was 2017-08-22)
  • Whether the package works reliably on modern operating systems and Python distributions
  • Active alternatives or recommended successors for new projects

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,279 days since the last release
First released
Downloads 12,072,900/month — #1,345 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: xlwt-1.3.0-py2.py3-none-any.whl

Keywords: xls, excel, spreadsheet, workbook, worksheet, pyExcelerator

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: DatabaseTopic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/LibrariesTopic :: Office/Business :: Financial :: SpreadsheetTopic :: Software Development :: Libraries :: Python Modules

Tags

write excel files pythoncreate xls spreadsheetsgenerate excel 97-2003python excel writerxls file generationspreadsheet creation libraryexcel workbook python
legacy-formatabandoned

More Python Modules packages