xlsx

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

Updated Oct 7, 2022
One-click install
npx skills add https://github.com/tamagusko/linux-cfg --skill xlsx-tamagusko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/tamagusko/linux-cfg/tree/main/dotfiles/claude/skills/xlsx
Command: npx skills add https://github.com/tamagusko/linux-cfg --skill xlsx-tamagusko

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 ensures every .xlsx, .xlsm, .csv, or .tsv file you create or edit uses live Excel formulas, follows financial-modeling conventions, and ships with zero formula errors. ## Core Features & Use Cases - Formula-first spreadsheet creation: Builds workbooks with openpyxl using real Excel formulas (SUM, AVERAGE, growth rates) instead of hardcoded Python-computed values, so files stay dynamic and recalculable. - Mandatory recalculation and error scanning: The scripts/recalc.py tool drives LibreOffice headless to recalculate all formulas and reports any #REF!, #DIV/0!, #VALUE!, or #NAME? errors with exact cell locations as JSON. - Financial modeling standards: Enforces industry color coding (blue inputs, black formulas, green cross-sheet links), number formats ($#,##0, 0.0%, 0.0x multiples), and source documentation for hardcoded values. - Use Case: Ask for a three-year revenue projection model and receive a workbook with assumption cells, formula-driven projections, proper currency formatting, and a verified error-free recalculation pass. ## Quick Start Use the xlsx skill to create a financial model spreadsheet with revenue projections 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 recalculates all 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 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 calculated values?

openpyxl stores formulas as strings but never evaluates them, so cells lack cached values. Recalculate with LibreOffice using scripts/recalc.py, which updates all values and scans every cell for Excel errors.

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

Run python scripts/recalc.py on the workbook. It returns JSON with an error_summary listing each error type, its count, and exact cell locations like Sheet1!B5, so you can fix and recheck.

What happens if I save an openpyxl workbook loaded with data_only=True?

Saving a workbook loaded with data_only=True permanently replaces all formulas with their cached values. Only use data_only=True for reading calculated results, never for files you intend to modify and save.