Check if ChatGPT or Claude silently overwrote Excel formulas
When ChatGPT, Claude, or Copilot edits an Excel workbook (.xlsx), it often runs Python scripts using
pandas or openpyxl. If the script reads cached values (data_only=True in
openpyxl or default pandas.read_excel) and saves back to disk, formulas such as
=SUM(B2:B9) are silently frozen into plain numbers. The total still looks plausible on screen, yet
future assumption edits stop updating the model.
This page is published by the makers of FormulaGuard, the browser, CLI, and MCP tool in method 4. Methods 1 to 3 work without it.
Common silent AI workbook bugs
- Formula replaced by a static number:
=SUM(C2:C12)turns into142800while showing the exact same number today. - Shortened aggregate range:
=SUM(B2:B50)shrinks to=SUM(B2:B48), omitting rows appended during the edit. - Uncached
openpyxlformulas: formula strings stay intact, while<v>cached values are left blank until Excel recalculates and saves. - New errors or hidden structure:
#REF!errors or newly hidden rows and columns buried across secondary tabs.
1. Quick manual check with Show Formulas
Press Ctrl + ` in both the baseline workbook and the AI-edited copy to display formula text instead of numbers. This catches obvious blanked sheets, though on multi-tab workbooks it is easy to miss a single frozen subtotal or a narrowed range.
2. Diff cells in Excel with FORMULATEXT
Use FORMULATEXT on a helper sheet while keeping both workbooks open:
=IFERROR(FORMULATEXT('[old.xlsx]Sheet1'!A1), '[old.xlsx]Sheet1'!A1&"")<>IFERROR(FORMULATEXT('[new.xlsx]Sheet1'!A1), '[new.xlsx]Sheet1'!A1&"")
Know its limits before signing off on a large AI edit:
- Keep both workbooks open together. If the other workbook is closed, FORMULATEXT falls back to cached values: a formula replaced by the same number then shows FALSE, and unchanged formulas can show TRUE.
- Sheet protection can hide formulas and trigger the same fallback error.
- It misses a number retyped as text (for example
100converted into"100"), and one inserted row shifts every row below it.
3. Use Microsoft Spreadsheet Compare (Windows only)
Microsoft states Spreadsheet Compare is available “only in Excel for Windows” in eligible enterprise editions (source), showing differences in values, formulas, formatting, and macros. On a Mac, see Spreadsheet Compare on a Mac.
4. Verify AI edits locally with FormulaGuard (Browser, CLI, or MCP)
FormulaGuard compares your original and AI-edited .xlsx, .xlsm, .xlsb, .xls, or .ods
workbooks completely on your machine without uploading spreadsheet files:
- Flags formulas overwritten with typed values—even when the number on screen did not change.
- Catches shrunk
SUM/AVERAGE/COUNTranges, newly hidden rows or columns, and new#REF!errors. - Separates intact uncached
openpyxlformulas from overwritten values, and isolates direct edits from downstream cascaded recalculations.
Web app (Mac, Windows, Linux offline PWA): Drop both files directly in your browser. Free up to
2 worksheets and 500 rows per sheet (the free report is watermarked and lists up to 12 critical or high
findings). Pro is a one-time $29 (5 activations) lifting web sheet/row limits and adding full unwatermarked HTML
reports, .xlsx diff ledgers, and protected ranges.
CLI & AI Agent MCP Self-Check: Developers and Claude/MCP workflows can run full-workbook
checks locally on Node.js 18+ via npx formulaguard or let an agent verify its own edits with
npx -y formulaguard-mcp (snapshot_workbook → edit → audit_workbook_changes):
npx formulaguard original.xlsx ai-edited.xlsx --align smart --fail-on critical
Related: Spreadsheet Compare on a Mac · How to compare formulas between two Excel files.