xls2xlsx
Convert xls file to xlsx
Decision gist · record as of 2026-08-14
Yes, if you need to convert .xls, .htm, or .mht files to .xlsx and can accept that formulas, charts, and advanced Excel features will not be preserved. The low install friction and permissive license make it a straightforward choice for one-off or batch conversions. The dormant maintenance status is acceptable for a stable, narrowly-scoped tool with no known vulnerabilities, but do not expect active bug fixes or feature development.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.7.
- For .htm/.mht input, Pillow's font detection may fall back to estimation if system fonts are unavailable.
- Low friction: pure Python wheel with no compiled dependencies.
License · maintenance · safety
MIT license (permissive) — MIT license (permissive) places no restrictions on use, modification, or redistribution in commercial or private projects.
last release 2023-01-06 (1316 days) · last repo commit 2024-04-23 · 63 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,000,327 downloads/mo, #3,374 on PyPI
Alternatives
Verify before relying
pip install xls2xlsx
from xls2xlsx import XLS2XLSX
x2x = XLS2XLSX("spreadsheet.xls")
x2x.to_xlsx("spreadsheet.xlsx")- Whether the 12 runtime dependencies are all actively maintained.
- Performance characteristics with large files or batch conversions.
- Accuracy of font size estimation when system fonts are missing.
- Excel version compatibility of the output .xlsx files.
What it is and what it does
xls2xlsx is a command-line and Python library tool that converts three input formats—Excel 97-2003 workbooks (.xls), HTML web pages (.htm), and single-file web archives (.mht)—into Excel format (.xlsx). It preserves a wide range of formatting: text styles (bold, italic, underline, strikeout), cell colors and fills, borders, alignment, number formats including currency symbols, merged cells, hyperlinks, comments, and hidden rows/columns. It handles multiple worksheets and Unicode content.
The package has significant limitations: it does not preserve formulas (only their calculated values), conditional formatting, charts, drawings, pivot tables, or VBA macros. For .htm/.mht input, it converts images and text boxes to images but cannot handle shapes or clip art. The conversion relies on xlrd and openpyxl for .xls files and beautifulsoup4 with Pillow for HTML content. Font measurement for HTML input uses Pillow's ImageFont and falls back to estimation when system fonts are unavailable.
Use it for
- Migrate legacy .xls files to .xlsx format for compatibility with modern Excel versions and cloud tools.
- Batch-convert HTML tables from web pages or exported reports into structured Excel workbooks.
- Extract and preserve formatted data from .mht (single-file web archive) documents into Excel.
- Automate spreadsheet format conversion in data pipelines where formulas and advanced features are not required.
- Convert historical Excel data with preserved styling (fonts, colors, borders) without manual re-entry.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to convert .xls, .htm, or .mht files to .xlsx and can accept that formulas, charts, and advanced Excel features will not be preserved.
The low install friction and permissive license make it a straightforward choice for one-off or batch conversions. The dormant maintenance status is acceptable for a stable, narrowly-scoped tool with no known vulnerabilities, but do not expect active bug fixes or feature development.
Install
xls2xlsx on PyPI
Before you install
Low friction: pure Python wheel with no compiled dependencies. Maintenance is dormant (1316 days since last release in January 2023), though the repository remains active with a recent commit in April 2024. Suitable for stable, one-off conversion tasks but not for packages expecting ongoing updates.
Requires Python >= 3.7. For .htm/.mht input, Pillow's font detection may fall back to estimation if system fonts are unavailable.
License in practice
MIT license (permissive) places no restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install xls2xlsx
from xls2xlsx import XLS2XLSX
x2x = XLS2XLSX("spreadsheet.xls")
x2x.to_xlsx("spreadsheet.xlsx")
Verify before relying
- Whether the 12 runtime dependencies are all actively maintained.
- Performance characteristics with large files or batch conversions.
- Accuracy of font size estimation when system fonts are missing.
- Excel version compatibility of the output .xlsx files.
Package facts
| License | MIT license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 12 packagesxlrdopenpyxlrequestsbeautifulsoup4Pillowpython-dateutilcssutilswebcolorscurrency-symbolschardetfonttoolsPyYAML |
| Maintenance | Dormant 1,316 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,000,327 / month, #3,374 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: xls2xlsx-0.2.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “xls to xlsx converter”
- xls2xlsxConverts legacy Excel files (.xls), HTML tables, and single-file web…
- pyexcel-xlsReads, manipulates, and writes data in xls format; also reads xlsx…
- agate-excelAdds Excel file (xls and xlsx) read support to the agate data…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also ssf · xlrd · xlsx2html · excelrd · drf-excel · aspose-cells · xlrd3 · aspose-cells-python · openpyxl · openpyxl-stubs