xlsx

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

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

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, inconsistent formatting, or hardcoded values that cannot update. 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 (SUM, growth rates, averages) instead of hardcoded Python-computed values, keeping workbooks dynamic and recalculable. - Automated recalculation and error detection: The scripts/recalc.py utility drives LibreOffice headlessly to recalculate all formulas and reports every #REF!, #DIV/0!, #VALUE!, or #N/A error with exact cell locations as JSON. - Financial modeling conventions: Enforces industry-standard color coding (blue inputs, black formulas, green cross-sheet links), number formatting (parenthesized negatives, 0.0% percentages, 0.0x multiples), and documented hardcode sources. - Use Case: A user asks to build a three-year revenue projection model. The Skill creates the workbook with openpyxl, places assumptions in dedicated cells, writes formulas referencing those assumptions, runs recalc.py to verify zero errors, and delivers a formatted .xlsx file. ## Quick Start Use the xlsx skill to create a sales forecast spreadsheet with formulas for totals and growth rates, then recalculate and verify it has no 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. Run scripts/recalc.py afterward so LibreOffice calculates the formula values, since openpyxl stores formulas without evaluating them.

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 workbooks while preserving their structure.

Why do openpyxl formulas show no values after saving?▼

openpyxl writes formulas as strings but never calculates them, so cells appear empty until opened in Excel. Run scripts/recalc.py, which uses LibreOffice headlessly to recalculate all formulas and save the computed values.

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

Run python scripts/recalc.py on the file. It returns JSON listing every error type with exact cell locations like Sheet1!B5, plus the total formula count, so you can fix references and recalculate again.

Does reading Excel with data_only=True lose formulas?▼

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