xlio
xlio is an internal package of the sheetmill project. It reads xlsx files as Excel reads
them and changes their cells without disturbing anything else. It was extracted from
xlrecalc, whose own reader and writer it began as, to be
shared by the sheetmill packages. It is not intended for direct use: its API may change in any
minor release without the deprecation period the public sheetmill packages give, while patch
releases only fix bugs and keep the API. If you depend on it anyway, pin a minor version (for
example xlio==0.7.*).
It is written in pure Python with the standard library only. The reader checks a package before it parses anything (part count and sizes, compression methods, encryption, names used twice, a DTD in any part) and refuses what Excel refuses; the writer copies every part it does not change byte for byte and rewrites only the cells it is given.
Which Excel it follows: read_csv reads a CSV file as Excel for Windows opens it, unless it is
given platform="mac", which reads it as Excel for Mac does; read_fixed_width reads fixed-width
text as Excel opens it, the same on both platforms. Both rest on results captured from Excel under
Microsoft 365. The readings of xlsx files (open, check) take no platform: they were captured
from Excel 16 for Mac, and most are not yet verified on Windows. Those captured on both platforms
gave the same results: error values (each error's text and ERROR.TYPE), how a conditional format's
base rule joins its extension rule, the refusal of a sheet with two conditional-formatting
extensions, and where a group shape's members are drawn (but for a group with a zero child extent,
which xlio leaves unplaced). A cell font's size is read as Excel for Windows holds it, not yet
verified on the Mac. The files patch writes with the newer errors and with formulas marked for
recalculation open in Excel on both platforms without a repair.
xlio is part of the sheetmill project, with xlformat, which applies Excel number formats, xlrecalc, which recalculates workbooks, and sheetpeek, which shows workbooks as Excel does.
What it covers
openreads a workbook lazily: its sheets' cells (values typed as Excel reads them, formulas, rich values behind the cells), styles and theme, tables, conditional formats, views, print settings, calculation settings, the drawing (pictures with their outline and effects, shapes, charts' frames, group shapes with their members, each with its box in its group's), notes and threaded comments, and every element it does not model, listed.checktells whether Excel would open a file without a repair.patchchanges cells, cached results and array fills and copies everything else byte for byte; it writes each error as Excel writes it (the newer ones as#VALUE!with a rich value), can mark formula cells for Excel to recalculate (recalculate=) and can ask Excel to recalculate every formula on opening.read_csvandread_fixed_widthread CSV and fixed-width text into a one-sheet workbook as Excel opens such a file: each field converted as Excel converts it (numbers, dates, errors, text).CsvOptionssays how to read a CSV file,FixedWidthOptions(itsFields) a fixed-width one; both areTextOptions.
Files from people you do not trust
Open them with limits=xlio.ReadLimits.UNTRUSTED, which bounds what reading one may cost (its
parts, their sizes, its cells, its text). To report a security problem, see
SECURITY.md.
Development
uv sync --group docs then uv run pytest;
CONTRIBUTING.md
has the pip route, the full set of checks and the commit conventions.
Most of the code is written with Claude Code, reviewed before each commit and tested against
results captured from Excel; see
CONTRIBUTING.md.
License
The code is under the MIT license
(LICENSE).
src/xlio/data/presetTableStyles.xml, the built-in table and pivot table styles from ECMA-376,
is under Ecma International's text copyright policy, as published by Ecma; see
NOTICE.
Metadata
Release files for xlio 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xlio-0.7.0.tar.gz | 427.7 kB | With provenance | Details for xlio-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xlio-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for xlio-0.7.0-py3-none-any.whl |
Total release size: 578.2 kB
Release files / xlio-0.7.0.tar.gz
| Download URL | xlio-0.7.0.tar.gz |
|---|---|
| Size | 427.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4b2ab2d7a330ebf95e11d52d6fd91c06bf6a97e44b5cf09b5d54b3203789df7
|
|
BLAKE2b-256 checksum How to use checksums |
9bcbc49962ff5eb724050a68fee19aab4bc9d346ef191b095b8326505c92b8d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / xlio-0.7.0-py3-none-any.whl
| Download URL | xlio-0.7.0-py3-none-any.whl |
|---|---|
| Size | 150.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20117debbced81519fe270249e5c80630b5efd667d452de801562e804051cdc3
|
|
BLAKE2b-256 checksum How to use checksums |
777d12f561d8828f3724d08cfee314d61fe34b5cd9e170b7ca8e18ee1a166b40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for xlio 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for xlio-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.