--- id: xls2xlsx version: "0.2.0" license: MIT license license_treatment: permissive maintenance: dormant --- # xls2xlsx — Convert xls file to xlsx License: permissive · Maintenance: dormant · Downloads: 2.0M/mo ## 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 above — verify before relying. Converts legacy Excel files (.xls), HTML tables, and single-file web pages (.mht) to modern Excel format (.xlsx), preserving formatting, styles, and basic structure. 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 pip install xls2xlsx uv add xls2xlsx poetry add xls2xlsx ## Installing xls2xlsx 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. 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") Requires Python >= 3.7. For .htm/.mht input, Pillow's font detection may fall back to estimation if system fonts are unavailable. 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_current - Install friction: low - Maintenance: dormant - Downloads: 2.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags xls to xlsx converter, excel file format conversion, legacy spreadsheet migration, html table to excel, batch xls conversion, file-conversion, spreadsheet-tools [View on SkillFed](https://skillfed.io/packages/xls2xlsx) · [View on PyPI](https://pypi.org/project/xls2xlsx/)