xlsx

Create, edit, and recalculate Excel spreadsheets with formulas using openpyxl and pandas.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/wolfmanstout/agent-skills --skill xlsx-wolfmanstout
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/wolfmanstout/agent-skills/tree/main/subtrees/skills/skills/xlsx
Command: npx skills add https://github.com/wolfmanstout/agent-skills --skill xlsx-wolfmanstout

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Working with spreadsheet files programmatically often leads to hardcoded values, broken formulas, and formula errors like #REF! or #DIV/0! that corrupt deliverables. This Skill provides a disciplined workflow for creating, editing, and analyzing .xlsx, .xlsm, .csv, and .tsv files so every spreadsheet remains dynamic, error-free, and professionally formatted. ## Core Features & Use Cases - Formula-first spreadsheet generation: Builds Excel files where all calculations use native Excel formulas instead of Python-hardcoded values, keeping workbooks dynamic and updateable. - Automated recalculation and error detection: Uses the scripts/recalc.py tool with LibreOffice to recalculate all formulas and report every #REF!, #DIV/0!, #VALUE!, and #NAME? error with exact cell locations. - Financial modeling conventions: Enforces industry-standard color coding, number formatting, and assumption placement for professional financial models. - Use Case: A user asks to build a revenue forecast model from raw sales data. The Skill creates the workbook with openpyxl, writes growth formulas referencing assumption cells, applies blue-input/black-formula color conventions, then runs recalc.py to verify zero formula errors before delivery. ## Quick Start Use the xlsx skill to create a formatted sales summary spreadsheet from my data.csv file with formulas for totals and growth rates.

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 like '=SUM(B2:B9)' directly into cells, then save the workbook. After saving, run the recalc.py script with LibreOffice to calculate formula values and verify no errors exist.

Should I use pandas or openpyxl for Excel files?

Use pandas for data analysis, bulk operations, and simple exports with pd.read_excel and df.to_excel. Use openpyxl when you need formulas, cell formatting, multiple sheets, or editing existing workbooks while preserving structure.

Why do openpyxl formulas show no calculated values?

openpyxl stores formulas as strings but never evaluates them, so cells lack computed values until opened in a spreadsheet application. Run the recalc.py script, which uses LibreOffice headless mode to recalculate all formulas and save the results.

How do I find #REF! or #DIV/0! errors in an Excel file?

Run python scripts/recalc.py on the workbook. It returns JSON listing every error type with exact sheet and cell locations, plus a total formula count, so you can fix each issue and recalculate again.

Can I read Excel formula results without losing the formulas?

Load the workbook with load_workbook('file.xlsx', data_only=True) to read cached calculated values. Never save from a data_only session, because doing so permanently replaces all formulas with static values.