Validator/debugger for .xlsx workbooks
Project description
xlodit
xlodit audits .xlsx workbooks and emits deterministic machine-readable reports.
Scope
- Detects formula errors and formula error datatypes
- Detects numeric values stored as text (regex-based)
- Runs minimal structural checks
- Builds traceback trees for failing formula cells
- Read-only: never mutates the input workbook
Install / Run
From PyPI:
pip install xlodit
Use uv during development:
uv run xlodit path/to/workbook.xlsx
By default, xlodit prints a Rich terminal report and writes a JSON dump to <filepath>.xlodit.json.
Use --format json to print JSON to stdout. Terminal output uses rich for improved formatting.
CLI
uv run xlodit <filepath> [--backend auto|libreoffice|none] [--format terminal|json] [--output path] [--max-traceback-depth N]
Use --help to see full option descriptions and defaults.
Exit Codes
0: audit completed and no errors1: audit completed and at least one error2: tool/runtime failure
Limitations
.xlsxonly- No
.xlsm/.ods - No macro/VBA analysis
- No formatting/chart/pivot validation
- No workbook mutation or auto-fix
- No full Excel formula engine
License
MIT
JSON Output
Primary output format is canonical JSON:
- Stable key ordering
- Deterministic issue ordering (severity, sheet, cell, rule)
You can write JSON output to a file with --output.
Agentic Use
- Deterministic JSON ordering for reliable diffs
- Stable rule IDs and issue kinds
- Exit codes map cleanly to success, error, or runtime failure
Example
uv run xlodit sample.xlsx --format json --output report.json
uv run xlodit sample.xlsx --format terminal
API
Programmatic use is available via audit_workbook:
from xlodit import audit_workbook
report = audit_workbook("/path/to/workbook.xlsx", backend="auto", max_traceback_depth=10)
report_dict = report.to_dict()
Key fields in the JSON report:
ok: boolean success indicatoraudit_completed: whether the audit finished without runtime failurebackend: backend details (requested, used, recalculated)summary: counts for errors, warnings, totalissues: list of issues withseverity,kind,rule_id,message, and location fields
For formula_error issues, traceback includes a tree of referenced cells. Each node has sheet, cell, failing, optional value, and children for upstream dependencies.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xlodit-0.1.0.tar.gz.
File metadata
- Download URL: xlodit-0.1.0.tar.gz
- Upload date:
- Size: 532.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d38005d85cb1a6aa3303d832a1ad1dd80db9d4793cc0e957832ed5aa6470553
|
|
| MD5 |
1e08c6903370078d10000112ec8098a9
|
|
| BLAKE2b-256 |
4f37d30378f51f6c052719010c48baedb667e67e52d588fa3a8e9b052707f1a8
|
File details
Details for the file xlodit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: xlodit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4cad15afa6458babbd4c84985b9e0cc79c6752c27d80ad9a6d90611b507b8f
|
|
| MD5 |
9dd7b84ecd72517b1a1fec56266a71e8
|
|
| BLAKE2b-256 |
29e1aa35444d5a85f8ef93e72c121529d66172c7f5a9e763db5f9fb8942acc85
|