wolfxl

Migration playbook

Move one production workflow at a time

A useful migration preserves the workbook contract your application already depends on. Start with one real operation, one representative template, and acceptance evidence that can fail clearly.

1. Inventory the workbook

Run the local fit check before editing. Record formulas, pivots, slicers, charts, macros, external links, protection, and embedded objects that affect the workflow.

2. Freeze a representative fixture

  • Use a scrubbed or synthetic workbook with the same relevant package structure.
  • Keep the original file immutable and write every test result to a new output path.
  • Define the exact cells, ranges, tables, or workbook parts the application is allowed to change.
  • Define the parts that must remain byte-identical or semantically equivalent.

3. Replace the narrowest code path

WolfXL follows openpyxl-shaped APIs where supported. Existing template edits should use modify mode so the writer can patch the source package instead of rebuilding unrelated workbook parts.

from wolfxl import load_workbook

workbook = load_workbook(
    "template.xlsx",
    modify=True,
    keep_links=True,
)
worksheet = workbook["Report"]
worksheet["B4"] = 42
workbook.save("output.xlsx")
workbook.close()

For macro-bearing OOXML files, review the compatibility matrix and use keep_vba=True when macro preservation is part of the acceptance contract.

4. Prove the output

  • Assert the intended cell and workbook changes.
  • Compare ZIP package parts that the workflow must preserve.
  • Reopen the output with WolfXL and the application that consumes it.
  • Check cached formula values separately from formula text when fresh calculation matters.
  • Measure the same operation, workbook, environment, and iteration policy used by the old path.

5. Roll out with a recovery path

Run the migrated path on a bounded production cohort, retain the prior implementation for rollback during the agreed observation window, and promote only after the output contract remains stable. Add each discovered compatibility boundary to a regression fixture before expanding the workload.

Need a fixed-scope migration?

The Production Workbook Pilot applies this playbook to one workflow, one environment, and agreed acceptance criteria.

Review the production pilot