Skip to content
Agent Model Fit

GuidesProposed validation guide

A Validation Gate for Spreadsheet Agents: What Must Pass Before Delivery

By Agent Model Fit

Published

Sources (4)

On this page

A spreadsheet agent’s workbook should remain a draft until you can account for its source rows, inspect its formulas, verify fresh calculation results and reconcile the output against the agreed business rules. Missing evidence for one of those checks should block delivery for business use, even when the file opens and the grand total looks right.

For digital and IT leaders, the useful deliverable is a workbook accompanied by evidence a reviewer can inspect. This guide proposes a small validation gate for that purpose. It is Agent Model Fit’s guidance, informed by product documentation, not a tested spreadsheet-agent system or a claim about any model’s reliability.

Start with a workbook whose rules are explicit

Choose a bounded task: for example, preparing a draft order summary from an approved export. Identify the source snapshot, required sheets and columns, the intended spreadsheet application, and who owns the business rules. Keep the original input unchanged so the reviewer has something to reconcile against.

Specify which fields are required, what makes a row unique, how excluded rows are recorded, and how quantities, currencies and rounding work. An invoice number alone may not identify a line; the key might need an invoice number and line number together. The owner should settle that rule before the agent starts deduplicating data.

Define what the agent may change. In a template, that might be the input rows and a summary sheet, while existing formulas and labels must remain intact. A missing price or an ambiguous currency is a question for the source owner, not an invitation to infer a plausible value.

Use five blocking checks

These are proposed checks for a simple, self-contained workbook. Tailor them to the intended decision before running the task. A failed or unavailable required check keeps the output in review; the agent can still deliver the draft and its exception report to the reviewer.

CheckEvidence needed before delivery
Source coverageEvery expected source key is accounted for exactly as required; omissions, duplicates and exclusions are explicit.
Input validityRequired values, types, units and allowed categories satisfy the agreed rules.
Formula integrityRequired formula cells contain the intended logic and cover the intended rows, including boundaries.
Fresh calculationResults were recalculated after the final edit in the intended application, then saved and checked.
Reconciliation and usabilityIndependent calculations agree at the required detail, and the saved workbook communicates its results and exceptions clearly.

1. Account for the rows before trusting the totals

Compare source and output identifiers in both directions. Every source row should have an output destination or a documented reason for exclusion, and every output row should trace back to an allowed input. Where the task combines several rows, retain the mapping into each aggregate.

Counts help, but equal counts cannot establish that the same records survived. Check the keys and their frequency, then compare the values attached to them. Otherwise, one omitted row and one duplicate can cancel in the count.

Keep rejected records visible in an exceptions list. A summary that silently drops unpriced items should not be presented as complete.

2. Validate the finished data, even when input controls exist

Check required fields, numeric types, allowed units and valid categories across the actual output. Distinguish a recorded zero from a missing value. Treat an unexpected negative quantity according to the task’s rule: it might be a valid return, or it might require correction.

Excel dropdowns and validation alerts do not prove that all final values are valid. Microsoft documents that copying, filling, formulas and macros can introduce invalid values without showing data-validation messages. That is why we recommend a separate check of the completed rows. See Microsoft’s guidance on invalid data.

3. Inspect formula logic and coverage

Identify the cells that should contain formulas and compare their references with the agreed calculation. Check the first and last data rows, added rows, subtotals and exceptions. Flag unexplained constants where a formula belongs. For a simple row-wise calculation, check every expected formula cell; boundary checks supplement that coverage rather than replace it.

A formula can produce a valid number from the wrong inputs. A total that ends one row early, or a line amount referring to the previous row’s price, needs a rule or reconciliation check even if no error symbol appears. Conversely, formula error values must be explained and handled according to the task; hiding them with a blanket fallback to zero does not resolve their cause.

Keep the checker separate from the agent’s explanation. For repeated tasks, encode stable rules as ordinary assertions over cells, keys and totals. Have a reviewer examine those rules; copying the agent’s calculation into a second place can reproduce the same mistake.

4. Verify calculation after the final edit

Writing a formula and calculating it are different operations. The Python library openpyxl can write formulas but does not evaluate them. Its data_only option reads stored results rather than performing a fresh calculation. See the official formula documentation and loading documentation.

Our proposed sequence is to open the completed copy in the intended application, recalculate, save, and inspect the saved artifact’s formulas and results. Record the application/version, calculation action and file revision. If the available tools cannot calculate the required formulas, report that check as unavailable.

Excel supports manual calculation. Microsoft’s Windows desktop guidance lists Ctrl+Alt+F9 for recalculating all formulas in open workbooks. Use the appropriate procedure for the target application and keep unrelated workbooks closed during this check. Microsoft also distinguishes stored values from displayed values; formatting a cell to two decimal places does not itself establish a rounding rule. See its recalculation and precision guidance.

Define rounding and any permitted comparison tolerance before reviewing a difference. Do not adjust them simply to make a failed comparison pass.

5. Reconcile independently and inspect what the recipient sees

Compute expected results from the preserved source and the agreed rules, without reading the workbook’s own summary as the expected answer. Compare at line and relevant group level as well as the grand total. For a small example, a reviewer can do the arithmetic directly; repeated work benefits from a separately reviewed calculation.

Then inspect the saved workbook in its intended application. Check that labels, units, date ranges, exceptions and totals are readable; that filters or hidden rows do not give a misleading view; and that required sheets remain present. Presentation checks complement the numeric checks. Neither establishes the other.

Illustrative example: the right total from the wrong rows

This example is hypothetical. No workbook or agent trial was run. Suppose an agent must summarize these three order lines, all in one agreed currency, with no tax or discounts:

Line keyQuantityUnit priceExpected amount
A-01250.00100.00
A-02175.0075.00
A-03325.0075.00

Each amount is quantity multiplied by unit price; the total is 250.00. Now suppose the output contains A-01 once and A-03 twice, with A-02 missing. It still has three rows and still totals 250.00. A row-count check and a grand-total check would both agree with the expected values.

The source-coverage check blocks delivery: A-02 occurs zero times and A-03 occurs twice. The required repair is to restore the correct mapping, then rerun the affected row, formula and reconciliation checks on the revised file.

Consider a separate variant: A-02’s unit price is absent from the source. The other two lines still support a subtotal of 175.00, but that is not a complete order total. The agent should identify the missing input and the partial coverage. It should not fill in 75.00 from this example or silently interpret the blank as zero.

Keep the evidence with the delivered version

Ask for the source snapshot reference, the final workbook revision, and a short check report containing expected and actual results. A useful failure entry names the sheet, row/key or cell, the violated rule, and the next action. “Validation passed” without those details gives the reviewer little to inspect.

Bind the report to the exact saved file, using an immutable version reference or a file hash. A hash identifies the bytes; it does not prove correctness. If the workbook changes, recheck affected calculations and dependencies and issue evidence for the new version. Do not reuse an earlier pass as if it covered later edits.

The person responsible for the business decision then reviews the exceptions, the limits of the checks and the intended use. Our agent completion scorecard provides a broader record for that acceptance decision.

Limitations and next action

These checks can reveal inconsistencies with specified inputs and rules. They cannot establish that the source data is true, that the rules reflect the business correctly, or that every important failure has been anticipated. This guide reports no measured detection rate, time saving or comparison between agents.

The proposed sequence assumes a simple workbook without macros, external data connections, iterative calculations or other dependencies requiring separate validation. Recalculating formulas alone is not evidence that every external source was refreshed. More complex workbooks need checks for their particular features and qualified review before consequential use.

Start with one bounded workbook your team already understands. Write its blocking rules and expected results before asking an agent to modify it. Then have the reviewer assess the workbook and the evidence together. That gives the next automation decision a concrete basis: which work can be checked mechanically, and which unresolved questions still need a person.

Provenance

Prepared by Agent Model Fit with AI assistance for primary-source research, drafting and editorial checks on October 3, 2026. Product documentation was inspected on that date. The validation gate is AMF’s proposed guidance; the order-line example is illustrative, not original experimental evidence. Editorial responsibility rests with the Agent Model Fit team. Human approval is handled separately against the reviewed article revision.

Sources

  1. Microsoft: Display or hide circles around invalid data
  2. openpyxl: Simple Formulae
  3. openpyxl: Tutorial, loading from a file
  4. Microsoft: Change formula recalculation, iteration, or precision in Excel