xlsx

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

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/littlt-momo-c-yfc/skills --skill xlsx-littlt-momo-c-yfc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/littlt-momo-c-yfc/skills/tree/main/skills/scientific-toolkit-skill/references/scientific-skills/xlsx
Command: npx skills add https://github.com/littlt-momo-c-yfc/skills --skill xlsx-littlt-momo-c-yfc

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 inconsistent formatting. This Skill provides a structured workflow for creating, editing, and analyzing .xlsx, .xlsm, .csv, and .tsv files so the deliverable is a dynamic, error-free spreadsheet rather than a static data dump. ## Core Features & Use Cases - Formula-first spreadsheet generation: Builds Excel files where calculations live in real Excel formulas (SUM, AVERAGE, growth rates) instead of Python-computed hardcoded values, keeping workbooks dynamic and updateable. - Mandatory formula recalculation and error scanning: Uses the bundled recalc.py script with LibreOffice 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 rules, and documented sources for hardcoded assumptions. - Use Case: A user asks to build a revenue projection model from raw sales data. The Skill creates the workbook with openpyxl, writes growth formulas referencing assumption cells, applies currency and percentage formats, then runs recalc.py to verify zero formula errors before delivery. ## Quick Start Use the xlsx skill to create a formatted Excel financial model from my sales data with live formulas 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 the recalc.py script afterward so LibreOffice calculates the formula values and reports any errors.

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 edits to existing workbooks.

Why do my openpyxl formulas show no calculated values?

openpyxl stores formulas as strings without evaluating them. Recalculate with LibreOffice using scripts/recalc.py, which updates all formula values and scans every cell for errors like #REF! and #DIV/0!.

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

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!, then recalculate again to confirm.

Can openpyxl preserve formulas when editing existing workbooks?

Yes, loading with load_workbook keeps formulas intact. Avoid saving with data_only=True, since that permanently replaces formulas with their cached values.