xlsx

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

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/skyrocoster/dnd-kids-resources --skill xlsx-skyrocoster
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/skyrocoster/dnd-kids-resources/tree/main/.agents/skills/xlsx
Command: npx skills add https://github.com/skyrocoster/dnd-kids-resources --skill xlsx-skyrocoster

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 broken formulas, hardcoded values that cannot update, and Excel errors like #REF! or #DIV/0! that only surface after delivery. This Skill provides a disciplined workflow for creating, editing, and analyzing .xlsx, .xlsm, .csv, and .tsv files so the final deliverable is a dynamic, error-free spreadsheet. ## Core Features & Use Cases - Formula-first spreadsheet creation: Builds workbooks with live Excel formulas via openpyxl instead of hardcoding Python-computed values, so sheets recalculate when source data changes. - Mandatory recalculation and error scanning: The scripts/recalc.py tool drives LibreOffice headlessly to recalculate all formulas and reports every #REF!, #DIV/0!, #VALUE!, and #NAME? error 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 hardcode sources. - Use Case: A user asks to turn a messy CSV export into a formatted financial model with growth projections; the Skill builds the workbook with assumption cells and formulas, recalculates it, fixes any reported errors, and delivers a clean .xlsx. ## Quick Start Use the xlsx skill to create a spreadsheet from my sales data with a totals row using formulas, then recalculate it and confirm there are 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 values and reports any formula 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 openpyxl formulas show no calculated values?▼

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

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

Run scripts/recalc.py on the file; it returns JSON listing each error type with cell locations like Sheet1!B5. Fix invalid references and guard divisions against zero denominators, then recalculate again until the error count is zero.

Can I read calculated values from an Excel file with openpyxl?▼

Yes, load the workbook with data_only=True to read cached calculated values. Do not save from that object, because saving with data_only=True permanently replaces formulas with their values.

When should this spreadsheet skill not be used?▼

Do not use it when the deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. It applies only when a spreadsheet file is the primary output.