Audits an Excel workbook: recalculates every formula and finds stale values, errors, hardcoded numbers and broken references.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Check an Excel workbook for the mistakes that cost money, in ONE command, and get a report plus a verified copy: every formula is recalculated by the GridCraft engine and compared with the value Excel last saved (stale or wrong numbers), #REF!/#DIV/0!/#N/A cells, circular references, numbers typed over a formula in a column of formulas, formulas that differ from their neighbours, references to sheets that do not exist or to empty cells, merged cells inside data, numbers stored as text. Use for: check this budget before the board meeting, is this spreadsheet correct, find the hardcoded numbers, why does the total not add up, audit a model somebody else built, verify all formulas. Triggers: audit, verify, check formulas, errors in my spreadsheet, hardcoded, stale values, does it add up, tjek regnearket, gennemgå budgettet.
python3 /skills/workbook-audit/scripts/audit.py audit /work/in/budget.xlsx /work/out/budget-audited.xlsx
recalculates the whole workbook with gridcraft-cli (a native spreadsheet engine, 514 Excel
functions, no Excel needed), compares every formula with the value last saved in the file, runs
the engine's error check, and inspects the structure with openpyxl. Inputs are in /work/in;
results go to /work/out. Every verb prints one OK … line or one ERROR … line.
| Need | Command |
|---|---|
| Full audit: report + verified copy | audit.py audit /work/in/budget.xlsx /work/out/budget-audited.xlsx → also writes budget-audited.md |
| Report somewhere else | add --report /work/out/audit-report.md |
| Only refresh every cached value | audit.py recalc /work/in/budget.xlsx /work/out/budget-recalculated.xlsx |
| Cap the number of findings | --max 50 (default 200) |
| Finding | Meaning for the person |
|---|---|
| stale value | the number shown in a cell is not what its formula gives when recalculated (the file was saved with calculation off, or edited by a tool that does not recalculate) |
| error #REF! / #DIV/0! / #N/A | a formula that cannot produce a value |
| circular reference | formulas that depend on themselves |
| hardcoded value in formula column | a number typed over a formula while the cells above and below still have the formula; the classic "the total is wrong" cause |
| inconsistent formula | a formula that differs from its neighbours' pattern |
| missing sheet | a formula refers to a sheet that is not in the workbook |
| reference to empty cell | a formula uses a cell that holds nothing |
| merged cells inside data | merges inside a data block break sorting, filtering and sums |
| numbers stored as text | they look like numbers but sums skip them |
The OK line summarises counts; the Markdown report lists every finding with sheet and cell;
the audited copy has every value recalculated and a new Audit sheet with the same table,
so the person can open it in Excel and click through. Tell the person the counts, the three
most important findings in words, and give both download links. A CSV has no formulas: say so
and offer csv-query instead.
SKILL.mdgate.jsonscripts/__pycache__/audit.cpython-311.pycscripts/__pycache__/audit.cpython-313.pycscripts/audit.pyWritten by Percerno, MIT licence.