What it is
Creates, edits, analyses and recalculates Excel workbooks (.xlsx, .xlsm) with live formulas, formatting and charts. For anyone delivering a workbook that others will keep working in. It never writes a derived value as a constant and never uses pandas’ writer on a workbook someone else will maintain.
Core workflow
| Stage | Content |
|---|---|
| Trigger | A task produces or modifies a workbook, turns CSV or TSV data into one, or reads values, formulas or formatting out of one |
| Input | The workbook, data sources, assumption cells, the existing template and formatting |
| Steps | Choose the tool (openpyxl for delivery, pandas for analysis, keep_vba=True for .xlsm), write derived items as formulas with assumptions in their own cells, run scripts/recalc.py after saving, fix the JSON’s four problem classes, deliver |
| Output | A recalculated workbook with values; recalc’s JSON report with exit 0 when clean, 1 on problems, 2 when it cannot run |
| Boundary | Needs LibreOffice; links to other workbooks stop recalc unless --force; openpyxl cannot write spilling dynamic-array formulas |
Getting started: Run recalc after any save that touched formulas, and copy the fix from missing_prefix straight back into the sheet.
Traits
- Formulas first:
=SUM(B2:B9),=(C4-C2)/C2,=B3*(1+$B$1), with assumptions in their own cells - recalc reports by field:
errors,missing_prefix,circular_references,uncalculated - Newer functions need their prefix:
_xlfn.XLOOKUP,_xlfn.TEXTJOIN,_xlfn._xlws.FILTER - Financial-model conventions: blue inputs, black formulas, green cross-sheet links, red cross-file links, yellow key assumptions
Who it is for and who it is not for
| Good fit | Poor fit |
|---|---|
| Financial models, budgets, expenses and inventory | One-off value exports, where pandas is faster |
| Deliverables that keep charts, validation and comments | Environments without LibreOffice |
| Workbooks that must recalculate as inputs change | Files with slicers or form controls that must survive |
How it differs
| Need | Use |
|---|---|
| Build or edit a workbook locally with a recalc check | appautomaton’s xlsx (this page) |
| Get analysis conclusions and chart reports directly, accepting remote work | skywork-excel |
| Generate a document report | appautomaton’s docx |
| Build a presentation | appautomaton’s pptx |
Source-level risks
| Risk | Source | Impact |
|---|---|---|
| Delivering before recalculation | openpyxl writes formulas without values and only recalc.py fills them | A file that skipped recalc shows blanks in some viewers |
| Silent damage | Inserting or deleting rows and columns rewrites no formula; saving after opening with data_only=True replaces formulas with last values | References drift and formulas are lost permanently, with no error |
| Content loss | openpyxl drops shapes, text boxes, slicers and form controls it does not model, and .xlsm loses macros without keep_vba | Parts of the original file vanish after opening |
| Version differences | LibreOffice below 24.8 lacks XLOOKUP, FILTER, SORT and others | recalc reports cells as uncalculated although Excel would compute them |