xlsx

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

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

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 produces broken formulas, hardcoded values, and inconsistent formatting. This Skill provides a complete workflow for creating, editing, and analyzing .xlsx, .xlsm, .csv, and .tsv files while guaranteeing zero formula errors and professional financial-model formatting standards. ## Core Features & Use Cases - Formula-first spreadsheet generation: Builds Excel files with live formulas instead of hardcoded Python-computed values, so models stay dynamic and recalculable. - Automated recalculation and error detection: Uses LibreOffice via scripts/recalc.py to recalculate all formulas and report #REF!, #DIV/0!, #VALUE!, and other errors with exact cell locations. - Financial modeling conventions: Enforces industry-standard color coding (blue inputs, black formulas, green cross-sheet links), number formatting, and assumption documentation. - Use Case: A user asks to build a revenue projection model from messy CSV data. The Skill cleans the data with pandas, writes formulas with openpyxl, applies formatting standards, recalculates with LibreOffice, and fixes any reported errors before delivery. ## Quick Start Use the xlsx skill to create a formatted financial model spreadsheet from the attached sales data CSV with live formulas and no calculation 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 the recalc.py script with LibreOffice to compute 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 via read_excel and to_excel. Use openpyxl when you need formulas, cell formatting, multiple sheets, or edits to existing files while preserving their structure.

Why do openpyxl formulas show no calculated values?

openpyxl stores formulas as strings without evaluating them. Recalculate with LibreOffice using the recalc.py script, which runs a macro to compute all formulas and scans every cell for errors like #REF! and #DIV/0!.

Does reading Excel with data_only=True lose formulas?

Yes. Loading with data_only=True reads cached values, and saving that workbook permanently replaces formulas with values. Only use data_only=True for reading, never for files you intend to save.

How do I fix #REF! and #DIV/0! errors in generated spreadsheets?

Run recalc.py to get a JSON report listing each error type with cell locations. Fix invalid cell references for #REF! errors and guard denominators against zero for #DIV/0! errors, then recalculate again to confirm.