A monitor shows spreadsheets flowing through Python scripts into validation checks and analytics dashboards.
Every enterprise IT department, financial desk, and analytics team eventually confronts the same apex predator: the load-bearing Excel workbook. You know the file. Its filename ends in something like _v14_FINAL.xlsx, it takes several tense seconds to recalculate whenever someone touches a dropdown menu, and it holds together an entire workflow with duct tape, INDEX lookups, and prayers.

A recent experiment published by XDA Developers writer Shivansh Raj Srivastava puts that familiar spreadsheet pain under a microscope. Rather than continuing to wrestle with a sprawling, multi-sheet workbook, Srivastava handed a 78,766-formula Excel file to Anthropic's Claude Opus 5.5 on a Claude Team plan and asked the AI agent to rebuild the entire system as a standalone Python package.

The resulting migration didn't just match Excel's output across 63,309 calculated cells—it also exposed two silent data bugs that Excel had been cheerfully calculating around the whole time. While the experiment relied on a synthetic workbook generated specifically for the test, the workflow offers a genuinely practical blueprint for Windows power users, analysts, and developers looking to turn fragile spreadsheets into testable code.

A monitor shows spreadsheets flowing through Python scripts into validation checks and analytics dashboards. Anatomy of a 78,766-Formula Monster​

To give the AI agent a serious stress test rather than a toy application, Srivastava first had Claude generate a deliberately complicated Excel workbook (SignalPath_YouTube_Analytics_v14_FINAL.xlsx) modeling 21 months of fake analytics for a fictional U.S. tech YouTube channel called Signal Path Tech.

The workbook was designed to mimic the exact kind of organic, accumulated complexity that plagues real-world spreadsheets:

  • Scale and structure: 20 interconnected worksheets, 189 named ranges, and 78,766 individual formulas.
  • Data volume: 364 video uploads and 9,969 rows of daily per-video statistics, alongside sponsor tracking, thumbnail A/B tests, business expenses, tax calculations, and a 12-month financial forecast.
  • Fragile dependencies: A single yellow dropdown cell controlled the dashboard's as-of date, triggering a cascade of recalculations across the file. The Forecast tab read from the Profit & Loss (P&L) sheet while the P&L pulled seasonality back from the Forecast tab, and the tax tab modeled unequal IRS estimated-tax periods running three, two, three, and four months long.
  • Recalculation drag: The workbook leaned on OFFSET for year-over-year growth and INDIRECT for dependent dropdowns—functions that recalculate every time the workbook updates.

On Srivastava's MacBook Air, changing that single yellow date dropdown froze Excel for 3.4 seconds of recalculation, ending with the workbook's 15-check Audit tab flashing red with 2 CHECK(S) FAILING. Even when the author knew why those checks were failing, tracing the cause across the grid required jumping through four different sheets.

How Windows Users Can Benchmark Their Own Workbooks​

If you are wondering just how much calculation debt your own Excel files are carrying on Windows, Microsoft's official Excel recalculation documentation lays out the exact mechanics happening under the hood. By default, Excel only recalculates cells whose precedent values have changed, utilizing multi-threaded calculation across all available logical processors (configurable in File > Options > Advanced under the Formulas section, supporting up to 1,024 calculation threads).

However, when a workbook is packed with tens of thousands of cross-sheet links or functions that automatically recalculate on every update, partial recalculation loses its edge. On Windows, you can run a fair stopwatch test using Excel's native calculation shortcuts:

  • F9: Recalculates only formulas that have changed since the last calculation (and their dependents) across all open workbooks.
  • Shift + F9: Recalculates changed formulas and their dependents in the active worksheet only.
  • Ctrl + Alt + F9: Forces a complete recalculation of every formula in every open workbook, regardless of whether precedent cells changed.
  • Ctrl + Shift + Alt + F9: Rebuilds the dependency tree from scratch, checks all dependent formulas, and forces a full recalculation across all open workbooks.

If pressing Ctrl + Alt + F9 on a modern Windows workstation gives you enough time to sip your coffee, your spreadsheet is no longer just a table—it is an uncompiled software application trapped in a grid.

The Migration Playbook: Don't Port Cells, Port Logic​

What makes XDA's experiment worth studying isn't just that an AI wrote Python code; it is the order of operations the agent used to deconstruct the spreadsheet. If you ask an LLM to blindly translate an .xlsx file into Python, it will usually hallucinate cell coordinates or drown in repetitive boilerplate. Instead, the migration followed a structured, four-stage engineering pipeline.

1. Collapse Formulas into Unique Logical Patterns​

Before porting a single calculation, Claude wrote an inventory script (tools/formula_inventory.py) that walked all 20 sheets and normalized each formula relative to its own cell position. In a spreadsheet, =B2+C2 on row 2 and =B3+C3 on row 3 are stored as separate formulas, even though they represent the exact same rule.

When the script stripped away the row-by-row repetition, the intimidating 78,766 formulas collapsed into just 469 unique pieces of logic. The Video_Daily sheet alone accounted for 39,876 formulas, yet all of them boiled down to just four distinct formula patterns. Across the entire workbook, INDEX appeared 43,400 times—mostly executing repetitive table lookups that Python's pandas library can handle in a single vectorized line of code.

2. Separate Raw Data and Configuration from Calculation​

Once the unique rules were mapped, the workflow performed a one-time extraction step:

  • Raw data tables were pulled out of the workbook into 12 clean CSV files.
  • Static assumptions and parameters were extracted into a single, human-readable configuration file, located by their Excel named ranges or column headers rather than fragile cell coordinates like $G$14.

3. Modularize the Sheets​

Each calculated worksheet was rebuilt as its own small Python module. Meanwhile, the tangled interplay between the Forecast sheet and the P&L sheet—which looked like a circular dependency inside the spreadsheet—was resolved cleanly by calling two Python functions in an explicit sequence.

4. Grade Against the Original Workbook to One Part in a Billion​

Here is the step that separates a reckless AI rewrite from a trustworthy migration: keeping the original Excel workbook as an automated answer key.

Rather than having Python inspect Excel's formulas during testing, the pytest suite opened the original .xlsx file, read the cached values that Excel itself had calculated, and compared them cell-by-cell against Python's output to a tolerance of one part in a billion ($10^{-9}$).

On Windows, running this workflow in PowerShell is as simple as swapping the macOS/Linux python3 binary for the Windows Python Launcher (py):

Code:
py tools/formula_inventory.py SignalPath_YouTube_Analytics_v14_FINAL.xlsx
py -m pytest

During the first test run, the suite failed—and caught a genuine migration bug. Two sponsor invoices in Python had due dates scheduled one day earlier than Excel's calculation, landing on Veterans Day and Martin Luther King Jr. Day. The extraction script had misread the starting row of the workbook's holiday table, leaving Python aware of only a single federal holiday for the year. Because the cell-by-cell test pinpointed the exact failing rows, fixing a single line in the extractor resolved the discrepancy. On the next run, all 63,309 calculated cells matched across 15 sheets, backed by 27 automated tests in total.

Parity vs. Correctness: The Two Bugs Excel Ignored​

Matching 63,309 cells proved that the Python package faithfully replicated Excel's math. It did not prove that Excel's math was right.

Spreadsheets are famously permissive. If a formula encounters a data type mismatch or a broken lookup key, Excel often shrugs, evaluates around the problem, or displays a warning on an audit tab while letting corrupted downstream totals flow right into your executive summary.

In the Signal Path Tech workbook, Claude had planted two classic spreadsheet errors that the workbook's Audit tab flagged in red—without stopping the rest of the workbook from calculating tainted numbers:

  1. The Silent Text-Number Trap: A $1,800 accountant invoice in June 2026 had been pasted into the expense sheet as the text string "1,800.00" rather than a numeric value. Because Excel's SUMIFS function silently ignores text cells, June 2026 expenses came up exactly $1,800 short—quietly inflating profit and distorting both the 12-month forecast and the estimated tax calculations. When Python loaded the data, its parser detected the string-formatted currency, converted it, and printed an explicit FIXED log line.
  2. The Typo Lookup Zero-Out: A sponsor deal referenced video ID SPT-O122 with a capital letter O instead of a zero (SPT-0122). In Excel, the lookup failed and quietly zeroed out the creator's view bonus. In Python, the validation logic refused to guess silently and prompted: did you mean SPT-0122?
Metric / CapabilityOriginal Excel WorkbookRebuilt Python Package
Core Logic Size78,766 formulas (469 unique), 189 named ranges~1,450 lines of modular Python code
Recalculation Speed (Author's Test)3.4 seconds in Excel0.6 seconds in Python (2.6s to generate full report, charts & Excel output)
Verification Mechanism15-check Audit worksheet27 pytest tests verifying 63,309 cells to $10^{-9}$
Silent Data Bugs Caught on LoadDisplayed 2 failing checks, kept calculating anyway2 bugs explicitly parsed, logged, or halted for review

Putting the "14-Minute Rebuild" in Perspective​

Srivastava reports that the entire migration—from initial prompt to a tested, working Python package—took just 14 minutes using Claude Opus 5.5, replacing the yellow dashboard dropdown with a single CLI command (python3 -m signalpath run --month "Dec 2025") that outputs a fresh report, charts, and a clean Excel summary file in 2.6 seconds.

That is an impressive showcase of where frontier coding agents stand following Anthropic's late-September 2026 release of Claude Opus 5.5, a model specifically tuned for long-horizon codebase migrations and self-verification loops. However, seasoned IT administrators and financial analysts should keep a few critical caveats in mind before pointing an AI agent at production spreadsheets:

  • Synthetic vs. Legacy Workbooks: As the author candidly notes, Claude generated this fictional workbook earlier in the same conversation. While the cell-by-cell pytest harness ensured the parity test couldn't be faked, a synthetic workbook lacks the weirdest scars of a 10-year-old enterprise file: undocumented manual overrides, hardcoded magic numbers wedged inside IF statements, legacy VBA macros, and external links pointing to a former employee's C:\Users\ folder. Untangling real institutional knowledge will take longer than 14 minutes.
  • Precision Nuances: Comparing floating-point results to one part in a billion ($10^{-9}$) works well for most analytics, but Microsoft's documentation notes that Excel stores and calculates with 15 significant digits of precision (and even allows permanent rounding if Set precision as displayed is enabled under File > Options > Advanced). Financial systems that require exact cent-level rounding across thousands of transactions must carefully align Python's decimal or pandas float handling with Excel's IEEE 754 implementation.
  • What About Native =PY() in Excel? Microsoft has invested heavily in bringing Python directly into the Excel grid via =PY() cells, which is great for quick data science visualizations or one-off pandas aggregations. But as Srivastava points out, embedding Python snippets inside worksheet cells still leaves your business logic scattered across a two-dimensional grid with no version control and no automated pytest suite guarding the perimeter.

The Verdict: Let Python Be the Engine, and Excel Be the Output​

Does this mean Microsoft Excel is obsolete? Hardly. Nothing beats a live spreadsheet grid when you want to poke a single assumption and watch dependent numbers react in real time, and stakeholders in finance and management will always demand an .xlsx file they can open, filter, and highlight.

The real takeaway for Windows power users is architectural. When a workbook grows to 20 sheets andnearly 80,000 formulas, Excel shouldn't be your database, your calculation engine, and your presentation layer all at once. By using an AI coding agent to inventory unique formulas, extract raw data to CSVs, and verify a modular Python engine against Excel's own calculated values, you get the best of both worlds: software-grade testing and validation under the hood, with a clean, formula-free Excel spreadsheet generated at the very end for everyone else.

 

References

  1. I rebuilt my most complicated Excel workbook in Python with an AI agent's help, and I'm not going back XDA 2026-10-18T10:00:19+00:00
  2. Introducing Claude Opus 5.5 \ Anthropic anthropic.com
  3. Change formula recalculation, iteration, or precision in Excel | Microsoft Support support.microsoft.com