xlsx

Create, edit, and recalculate Excel spreadsheets using openpyxl, pandas, and LibreOffice.

1|Updated Aug 11, 2026
One-click install
npx skills add https://github.com/Chia1104/agent-air --skill xlsx-chia1104
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/Chia1104/agent-air/tree/main/skills/claude/synced/b066812a-c7a5-4354-b574-f3c218098a45_0fdbac1f-d2db-4307-8341-b45c4d0d68f9/xlsx
Command: npx skills add https://github.com/Chia1104/agent-air --skill xlsx-chia1104

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, pandas, markitdown, defusedxml, lxml, and includes scripts (resource) components.

What problem does it solve? Working with spreadsheet files programmatically is error-prone: openpyxl writes formulas without cached values, modern Excel functions break under LibreOffice, and external workbook links get silently destroyed. This Skill provides the operational rules and scripts to produce correct, formula-driven .xlsx, .xlsm, .xltx, .csv, and .tsv files without shipping broken workbooks. ## Core Features & Use Cases - Spreadsheet creation and editing: Build new workbooks or edit existing ones with openpyxl and pandas, following strict conventions for fonts, number formats, and financial-model color coding. - Mandatory formula recalculation: The scripts/recalc.py tool runs LibreOffice headless to compute every formula, rewrites the file in place, and reports JSON error summaries naming exact cells with #VALUE!, #REF!, #NAME?, and other errors. - External-link protection: Detects formulas referencing other workbooks whose cached values would be lost on save, and refuses to recalculate unless --force is passed. - Use Case: A user asks to add a revenue projection tab to an existing financial model. The Skill writes SUMIFS and INDEX/MATCH formulas, recalculates with recalc.py, fixes any reported error cells, and delivers a workbook that recomputes when inputs change. ## Quick Start Use the xlsx skill to create a new spreadsheet from my sales data with a summary tab of formulas, then recalculate it and fix any formula errors.

Frequently Asked Questions about xlsx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an Excel file with formulas in Python?▼

Use openpyxl to write formula strings directly into cells, such as sheet['B10'] = '=SUM(B2:B9)', rather than hardcoding computed values. After saving, run scripts/recalc.py so LibreOffice calculates every formula and caches the results.

openpyxl vs pandas for Excel files: which should I use?▼

Use openpyxl when creating or editing workbooks with formulas and formatting, and pandas read_excel/to_excel for bulk data movement in or out. For a quick look at sheet contents, markitdown renders each sheet without cell coordinates.

Why do my openpyxl formulas read back as None?▼

openpyxl writes formulas as strings with no cached values, so pandas and data_only=True loads return None until the file is recalculated. Run scripts/recalc.py, which uses LibreOffice to compute formulas and rewrite the file in place.

Why does XLOOKUP show #NAME? after recalculation?▼

The runtime's LibreOffice cannot evaluate XLOOKUP, XMATCH, SORT, FILTER, UNIQUE, or SEQUENCE under any prefix. Use INDEX/MATCH for lookups and perform sorting, filtering, and de-duplication in Python before writing cells.

Can I edit .xlsm files without losing macros?▼

Yes, but you must pass keep_vba=True to openpyxl's load_workbook, otherwise the macros are stripped on save. The recalc.py script and markitdown both handle .xlsm files as well.

Why does recalc.py refuse to run on my workbook?▼

It refuses when the workbook links to another file and linked cells have lost cached values, because recalculating would resolve them to #NAME? and delete the links. Copy those values from the original first, or pass --force to accept the loss.