Agent edit study
Agents that save a spreadsheet quietly rewrite it
The xlsx skill in the public anthropics/skills repository tells an AI agent to edit an existing Excel workbook in three steps: load the file with openpyxl, write the cells, and run LibreOffice headless to recalculate so the file holds fresh values.
Published
I measured what that recipe does to real workbooks. On 4 of 8 workbooks, a one-cell edit removed slicers, timelines, sparklines, an extension data validation, or a whole Power Pivot data model with the pivots built on it. The recalculation step reported success with zero errors every time, and Excel opened every damaged file without a repair prompt. Nobody was told.
I build WolfXL, an openpyxl-compatible Excel library for Python with a Rust core. Running the same edit through WolfXL modify mode and its native calculation engine kept every part of all 8 workbooks.
The test
One edit:
- Open the workbook.
- On the first sheet, set
Z1to=1+1. - Save.
- Recalculate so the file stores the new cached value.
- Compare every package part and every sheet feature against the original.
An .xlsx file is a ZIP package of XML parts: worksheets, styles, pivot caches, slicers, drawings, data models, and the relationships between them. A one-cell edit should change the cell, its cached value, and little else.
I ran three workflows over the same 8 workbooks: seven real Excel files and one small synthetic file with an extension data validation and a sparkline group.1
- The usual path: the published
xlsxagent skill in theanthropics/skillsrepository, unmodified. It edits with openpyxl 3.1.5 and recalculates with its LibreOffice recalculation script. - WolfXL edit, LibreOffice recalculation: WolfXL modify mode for the edit, then the same LibreOffice recalculation.
- WolfXL end to end: WolfXL modify mode for the edit, then WolfXL's native
calculate().
All three produced the correct cached value, 2, in every file. The difference is everything else.
What the usual path removed
| Workbook | openpyxl + LibreOffice | WolfXL edit + native calculate |
|---|---|---|
| Pivot chart with slicers | 5 parts removed: the slicer and 2 slicer caches; 2 extension blocks stripped | nothing removed; 25 parts byte-identical |
| Timeline slicer | 6 parts removed: 2 timelines and a drawing | nothing removed; 26 parts byte-identical |
| Power Pivot P&L model | 234 parts removed: 6 pivot tables, 4 pivot caches, a slicer and 3 slicer caches, 6 of 7 drawings, and the data model | nothing removed; 257 parts byte-identical |
| Synthetic validation + sparkline | 8 extension blocks stripped: the data validation and the sparkline group | all 8 kept |
| Pivot, conditional format, table | intact | intact |
| Comments, validation, protection | intact | intact |
| Chart with conditional formats | intact | intact |
| Macro workbook (.xlsm) | intact | intact |
Three details make this worse than it looks.
The recalculation said everything was fine. The skill's recalculation script reported success with zero errors on all 8 files, including the one that lost 234 parts.
Excel said everything was fine. Every output of the usual path and of the WolfXL path was opened in Excel 16.113 for Mac. All 16 opened without a repair prompt.2
The only warning was a Python warning. openpyxl emits a UserWarning when it drops an extension it does not model, such as "Slicer List extension is not supported and will be removed." For the timeline workbook the warning read "Unknown extension is not supported and will be removed," which does not say what was lost. The saved file and the recalculation result carry no sign of the loss.
Two separate places where the file loses parts
The middle workflow separates the two steps.
With WolfXL doing the edit, the edit step removed nothing on any of the 8 files. Then LibreOffice recalculated, and the file lost parts anyway: the slicer and its caches from the pivot chart workbook, the timeline and its cache from the timeline workbook, and 75 parts from the Power Pivot workbook, including the data model and the pivot caches.
So there are two failure points:
- The save. openpyxl rebuilds the file from its own object model. Anything it does not model, it drops.
- The recalculation. LibreOffice loads the whole workbook into its own model and writes a new file. Anything it does not model, it drops, even when the file it received was intact.
Fixing only the first one leaves the second in place. That is why an agent needs the edit and the recalculation to happen in the same engine that preserves the file.
An earlier result points the same way
This is the second time I have measured this. In early September I diffed a save with no edit at all, through the LibreOffice build bundled in a desktop coding agent runtime, across five workbooks. It rewrote between 8 and 151 unrelated package parts per workbook. WolfXL changed zero.3 That study is written up in When an AI agent edits a spreadsheet, what happens to the workbook?, with SHA-256-pinned receipts.
A rewritten part is package drift and may be harmless. A removed slicer is lost work. The new study measures the second kind.
What WolfXL does differently
WolfXL modify mode patches the cells you change and copies every other package part through unchanged. The API is openpyxl's, so the edit code barely changes:
import wolfxl
wb = wolfxl.load_workbook("report.xlsx", modify=True) # keep_vba=True for .xlsm
wb["Inputs"]["B4"] = 42
wb.save("report-edited.xlsx")WolfXL Commercial adds native formula calculation that writes fresh cached values into the saved file, so the recalculation step never leaves the library. That is the end-to-end path in the table above.
WolfXL Community is MIT-licensed and on PyPI. It includes modify mode. Its formula evaluator computes values in memory, and it does not write cached values back into the file.4
A skill your agent can use today
I published an agent skill, wolfxl-xlsx, in the public WolfXL repository: github.com/SynthGL/wolfxl-oss/tree/main/skills/wolfxl-xlsx. It is a SKILL.md plus one helper script, MIT-licensed, and it gives an agent four steps:
inspectlists what an openpyxl save and a LibreOffice recalculation would each remove from this particular file.- The edit happens on a copy, in WolfXL modify mode.
recalcrecalculates with WolfXL and reports whether fresh values were written into the file.verifycompares the original and the edited copy and exits 1 if any part or feature went missing.
verify needs only the Python standard library, so it also checks files written by other tools.
Check your own workbooks
The study harness lives in a private repository, so here is the method in enough detail to rerun on your own files:
python -m pip install wolfxl
git clone https://github.com/SynthGL/wolfxl-oss
cp your-workbook.xlsx edited.xlsx
# make a one-cell edit to edited.xlsx with your usual agent workflow,
# including its recalculation step, then:
python wolfxl-oss/skills/wolfxl-xlsx/scripts/wolfxl_xlsx.py verify your-workbook.xlsx edited.xlsxExit 0 with "status": "preserved" means every part and sheet feature in the original is still there. Exit 1 lists parts_missing, families_lost, and sheet_features_lost. Files with slicers, timelines, pivot tables, sparklines, or a Power Pivot model are the ones to try.
Using WolfXL Commercial from agents and CI
Commercial installs from a private package index with a license credential. AI agents, CI jobs, and other automated systems you run for your organization don't need their own seats. They run under the seat of the person who sets them up.5
- Try it: a free 30-day Commercial evaluation for nonproduction work at wolfxl.com/evaluate.
- Install it in CI, containers, or an agent sandbox: copy-paste recipes for pip, uv, and Docker at wolfxl.com/agents#install.
- Buy it: Developer is $299 a year for one person, Team is $1,499 a year for up to five, and Organization is $1,999 a year for unlimited users in one organization. Monthly billing is available on each plan. wolfxl.com/pricing.
Hosted chat sandboxes that install only from public PyPI cannot reach the private index. There, the Community package and the skill's inspect and verify steps still let an agent see which parts are at risk and check the saved file before handing it back.
Limits
This is a small study. It shows that the failure exists on real Excel files and that it is silent. It does not say how often agents hit it. The method and limits are in the footnotes, and I would like the hardest sanitized workbook you can share.