excel-auditor
Excel Auditor
Analyze unknown Excel files to understand purpose, audit formulas, detect errors, and generate documentation.
Fidelity Firewall (never violate)
Auditing is reporting what the extraction found — not what a plausible spreadsheet of this kind would contain. An audit is only worth the trust placed in it. A confident, well-written finding built on a fact the extractor never surfaced is a fabrication, not an audit — no matter how reasonable it sounds. The failure mode this firewall exists to stop: on a sparse, ambiguous, or near-empty workbook, inventing a confident purpose and flagging formula errors that the extraction did not detect.
The hard rule — every claim must trace to extractor output. The JSON from extract_formulas.py and extract_structure.py is the only ground truth. Before you write any of the following, point to the exact field that supports it:
- Every flagged error (
#REF!,#DIV/0!,#VALUE!, circular reference, broken external link, etc.) MUST appear inerrors_found,circular_references, orissuesin the extractor JSON. Never report an error the extraction did not surface. If you believe an error could exist but the extractor didn't catch it, say "not detected by extraction; would require manual verification" — do not assert it. - Every cited cell (
Sheet1!B12, etc.) MUST come from a realcellfield in the JSON. Never construct a plausible-looking cell address. If you can't quote it from the output, you can't cite it. - Every risk claim (hidden content, hardcoded override, formula inconsistency, volatile-function abuse, VBA) MUST trace to the corresponding finding (
hidden_content,hardcoded_overrides,formula_inconsistencies,volatile_functions,has_vba). Therisk_assessment.workbook_scoreandrisk_factorsare computed from real findings — report them, don't inflate them.
Purpose detection must be grounded — and honest about confidence. Purpose is inferred from real evidence: sheet names, headers, named ranges, and formula patterns actually present in the JSON (purpose_analysis.reasoning lists the signals that fired). Read the confidence field and let it govern your language:
confidence >= 0.7with concrete reasoning signals → state the purpose, citing the signals.confidence < 0.5, few signals, orpurpose == "general_spreadsheet"→ say "purpose unclear from available signal" and give a LOW-confidence guess clearly labeled as such (e.g., "Low confidence (0.3): possibly a simple data list — only signal is N sheets with no formulas"). Never upgrade a weak guess into a confident claim.- On a near-empty / ambiguous workbook (few sheets, few or no formulas), the correct answer is insufficient signal, not an invented purpose. Naming a specific archetype (DCF model, CRM, three-statement model) requires the archetype's indicators to actually appear in the extraction — not vibes.