XLSX Tool
Use xlsx-tool instead of writing a one-off spreadsheet script.
Prepare
- Run
command -v xlsx-tool. - If missing and this repository is available, run
go install ./cmd/xlsx-tool. Otherwise rungo install github.com/evrenverse/xlsx-tool/cmd/xlsx-tool@latest. - Run
xlsx-tool --version. - Run
xlsx-tool capabilities --jsonandxlsx-tool doctor --json. - Use
xlsx-tool schema <name>when constructing structured input. - Work on a copy unless the user explicitly wants an in-place edit.
Inspect before editing
- Run
xlsx-tool info <file> --json. - Use
find --json, a boundedread --range, orread --cells. - Avoid dumping complete large sheets into context.
Edit and verify
- Prefer one
batchoperation for multiple changes. - Treat a leading
=as a formula. - Read every changed cell back with
--json. - Run
recalcwhen a downstream reader needs refreshed formula caches but no baseline exists to compare against. - If a baseline is available and LibreOffice is installed, run
validate. - Report the output path and any validation limitation.
Never overwrite the only copy of an important workbook. Do not claim complete format preservation without checking the resulting file.
Read references/cli.md when command syntax or exit behavior is needed.