Skip to content

How to verify an AI-edited Excel workbook before handing it back

Check the source data, the formulas, the saved results and the exact delivered file separately. An agent’s “done” message and a screenshot cannot establish that a workbook is correct. Our public close case gives you a concrete acceptance pattern to adapt.

By Renaissance Superintelligence Corporation (RSI)
· 4 min read · Updated

In this article
  1. Write the acceptance contract before the prompt
  2. Use four layers of verification
  3. Understand what a Python read actually proves
  4. Make failures explainable
  5. Deliver the reviewed bytes

Write the acceptance contract before the prompt

Start with what the reviewer will receive. For a recurring close, that means a new workbook with the original model intact, updated source tables, expected reporting periods, no unexplained differences and a visible exception trail. Define which sheets may change and which closed periods must remain fixed.

The Alder case makes those requirements executable. September must be preserved. October must be added to YTD and replace the oldest T12 month. New account 6265 must be mapped deliberately. The already-posted payroll adjustment must not be duplicated. The check is about a financial state transition, not a file extension.

Choose controls from independent accounting identities and source systems. If you create the expected answer with the same mapping and logic as the workbook, a shared error can pass both. A second program is only independent to the extent that its inputs and assumptions differ.

Use four layers of verification

First inspect the package. Confirm that the workbook opens, expected sheets and tables remain, formulas still exist where required, and external relationships are understood. Second inspect native behavior: open in Excel, refresh what needs refreshing, recalculate, scan formula errors, save and reopen.

Third reconstruct important results from source exports using a separate path. In our case, the validator uses ledger exports and decimal arithmetic to derive October reporting values. Fourth bind the result to the artifact you deliver: hash the final file after native saving and any metadata cleanup, then verify that same hash after download.

  • Structure: sheets, formulas, tables, names, links and VBA where relevant.
  • Behavior: refresh, calculation, save and reopen in the required application.
  • Numbers: independent totals, reconciliations and boundary periods.
  • Delivery: the exact reviewed bytes, plus a usable exception report.

Understand what a Python read actually proves

The public validator reads Excel’s saved results. In openpyxl’s loading documentation, data_only selects stored formula results rather than formula text. Reading such values is not the same as evaluating the formulas.

A cached value can be stale or absent. Inspect the formula version and cached-value version together, and require native recalculation before saving the final artifact. Never repair a failed cached result by replacing its formula with the expected number.

For a compact local inspection, open the same workbook twice in read-only mode as below. This is an inspection example, not a refresh engine. Close both handles afterward and do not save through the inspection script.

from openpyxl import load_workbook

path = "October 2026 close.xlsx"
formulas = load_workbook(path, read_only=True, data_only=False)
values = load_workbook(path, read_only=True, data_only=True)
try:
    for sheet in formulas:
        for row in sheet:
            for cell in row:
                if cell.data_type == "f":
                    saved = values[sheet.title][cell.coordinate].value
                    if saved is None:
                        print(sheet.title, cell.coordinate, "missing saved result")
finally:
    formulas.close()
    values.close()

Make failures explainable

The close case uses 14 workbook controls per month and an independent October reconciliation across 543 cells. These are different denominators. The controls summarize accounting relationships; the cell checks compare detailed reporting outputs. Neither count means “all possible errors have been ruled out.”

Useful failures name the source and the difference. “AR aging does not agree to the receivable control account by $420” directs a reviewer to a boundary. “Validation failed” leaves the next person to rediscover the work. Preserve the raw difference, its sign convention and the reporting date.

Include checks around changes in business structure. Our synthetic history includes an acquisition, intercompany eliminations, account migrations and a restated prior pack. Simple total equality cannot identify every wrong entity or period assignment.

Deliver the reviewed bytes

Run hashes after the final save. If a later metadata cleanup or format conversion changes the workbook, repeat the relevant checks on the changed file. The public verified-deliverables manifest binds the files to the native verification.

A file hash proves identity, not correctness. Its purpose is to prevent a good verification report from being attached to a different download. Keep the source checks, native checks and artifact identity together.

For your first implementation, use a small acceptance manifest with filenames, SHA-256 hashes, application versions, control results and unresolved items. Keep personal names, credentials and private file paths out of the public version. Use the public validators as a concrete starting point.

Evidence and method

This method is demonstrated by the native Panes October-close run and its public validators. The example uses synthetic business data. The native validation and the independent Python reconstruction are distinct checks. The 71.2-second media duration is not the runtime of every check, and no task-level bill was recorded. The close recording is a prepared, rehearsed scripted execution of real Office operations, not an end-to-end autonomous-agent evaluation; planning, script authoring, earlier takes and full validation are excluded.

Sources and files

Read as plain text · Editorial method and corrections

Give your agent the desktop.

Run the Office steps on Panes. Keep your agent and the rest of your stack.