xlsx

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

Updated Jun 14, 2026
One-click install
npx skills add https://github.com/ironkid90-s/lucky5-v7 --skill xlsx-ironkid90-s
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/ironkid90-s/lucky5-v7/tree/main/.github/skills/xlsx
Command: npx skills add https://github.com/ironkid90-s/lucky5-v7 --skill xlsx-ironkid90-s

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 static 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 Creation: Builds Excel files with live formulas (never hardcoded values) using openpyxl, then recalculates them via LibreOffice with the scripts/recalc.py script. - Error Detection and Repair: Automatically scans every cell for #REF!, #DIV/0!, #VALUE!, #NAME?, and other Excel errors, returning JSON with exact error locations for fixing. - Financial Modeling Standards: Enforces industry color conventions (blue inputs, black formulas, green cross-sheet links), number formatting rules, and documented hardcode sources. - Use Case: A user asks to build a revenue projection model from raw sales data. The Skill creates a workbook with assumption cells, growth formulas, proper currency formatting, recalculates all formulas, and verifies zero errors before delivery. ## Quick Start Use the xlsx skill to create a financial model spreadsheet from my sales data 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. Run scripts/recalc.py afterward to recalculate all formula values through LibreOffice 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 their structure.

Why do my openpyxl formulas show no calculated values?

openpyxl stores formulas as strings without evaluating them, so saved files lack computed values. Run scripts/recalc.py on the file, which uses LibreOffice headless to recalculate all formulas and save the results.

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

Run scripts/recalc.py on the workbook; it returns JSON listing every error type with exact cell locations like Sheet1!B5. Fix invalid references for #REF! errors and check denominators before division for #DIV/0! errors, then recalculate again.

Does reading Excel with data_only=True lose my formulas?

Yes, if you load a workbook with data_only=True and then save it, all formulas are permanently replaced with their cached values. Only use data_only=True for reading calculated values, never for files you intend to save.