xlsx

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

Updated May 24, 2026
One-click install
npx skills add https://github.com/MWest2020/skill-forge --skill xlsx-mwest2020
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/MWest2020/skill-forge/tree/main/skills/xlsx
Command: npx skills add https://github.com/MWest2020/skill-forge --skill xlsx-mwest2020

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Spreadsheet tasks often produce broken files: hardcoded values instead of live formulas, #REF! and #DIV/0! errors, and inconsistent financial formatting. This Skill enforces a disciplined workflow for building and editing .xlsx, .xlsm, .csv, and .tsv files so every deliverable recalculates cleanly and follows professional conventions. ## Core Features & Use Cases - Formula-first spreadsheet generation: Builds workbooks with openpyxl using real Excel formulas (SUM, growth rates, ratios) instead of Python-hardcoded values, keeping files dynamic and updateable. - Mandatory recalculation and error scanning: Runs scripts/recalc.py via LibreOffice to recalculate all formulas and returns JSON listing every #REF!, #DIV/0!, #VALUE!, and #NAME? error with exact cell locations. - Financial modeling standards: Applies industry color conventions (blue inputs, black formulas, green cross-sheet links), number formats ($#,##0, 0.0%, 0.0x multiples), and source documentation for hardcoded values. - Use Case: A user asks to build a three-year revenue projection model. The Skill creates the workbook with assumption cells and formulas, recalculates it with LibreOffice, fixes any reported errors, and delivers a clean .xlsx. ## Quick Start Use the xlsx skill to create a financial model spreadsheet from my data and verify it contains zero 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 like '=SUM(B2:B9)' directly into cells, then save the workbook. Formulas are stored but not evaluated, so run a recalculation step with LibreOffice to compute values before delivery.

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

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

Why do openpyxl formulas show no values after saving?

openpyxl stores formulas as strings without calculating them. Recalculate the file with LibreOffice (for example via scripts/recalc.py) to compute values, then verify with load_workbook using data_only=True.

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

Run the recalc.py script, which recalculates all formulas and returns JSON listing each error type with cell locations like Sheet1!B5. Fix invalid references and unguarded divisions, then recalculate again until zero errors remain.

Does reading Excel with data_only=True lose formulas?

Yes, if you save after loading with data_only=True, formulas are permanently replaced by their cached values. Only use data_only=True for reading calculated values, and keep a separate load without it for editing.