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+
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 xlwtuv
uv add xlwtpoetry
poetry add xlwtInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
xlutilsxlutils provides utilities for reading,…
permissive · top 5,000 on PyPI
xlwingsxlwings lets you call Python from Excel and…
permissive · top 5,000 on PyPI
xlsxwriterXlsxWriter creates Excel 2007+ XLSX files from…
permissive · top 1,000 on PyPI
excelrdExtracts data from Microsoft Excel spreadsheet…
permissive · top 15,000 on PyPI
PyExceleratePyExcelerate writes Excel XLSX spreadsheet…
permissive · top 15,000 on PyPI
spire-xlsSpire.XLS is a compiled Python library for…
unclear · top 15,000 on PyPI
XMindXMind creates, parses, and updates XMind mind…
permissive · top 15,000 on PyPI
xlrdxlrd reads data and formatting information from…
permissive · top 1,000 on PyPI
xlcalculatorReads MS Excel files and translates Excel…
permissive · top 15,000 on PyPI
xlrd3Reads data from Excel spreadsheet files (.xls…
permissive · top 15,000 on PyPI