๐ฟ xlsx-integrity-check v1.0.0
Check an .xlsx before you send it. Spreadsheet files get silently corrupted โ a library that rewrites the package, a hand-edited XML, a half-finished export โ and the damage is often invisible to the tool that did it. Excel and LibreOffice even disagree about what to render, so a file can look fine to you and broken to whoever receives it.
This tool inspects the raw OOXML package and reports the failure modes it can prove, before the file leaves your machine.
pip install "xlsx-integrity-check @ git+https://mandrilly.com/git/xlsx-integrity-check.git"
[git] ยท MIT ยท Python โฅ3.9 ยท zero deps
| Check | Severity |
|---|---|
duplicated cells in a row (same r reference) | ERROR |
unsorted rows / duplicated <row r=...> | ERROR |
| real open check (LibreOffice โ CSV) | ERROR on failure |
--ref ORIG.xlsx: drawings/media byte-equal to the original | ERROR if changed |
| orphaned graphics; media present but no drawing references them | WARNING / ERROR |
| broken relationships, ghost sheet parts | WARNING |
The last two catch the classic high-level-library damage: the images are still inside the zip, but nothing references them any more, so they vanish from the rendered sheet.
| Exit | Meaning |
|---|---|
| 0 | OK โ no blocking error |
| 1 | blocking error(s) found |
| 2 | usage / input error |
LibreOffice (soffice) is optional โ used only for the real-open check; if absent, that check is skipped with a warning instead of failing. Python API: check(path, ref=..., open_check=False).