xlsx

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

Updated May 5, 2026
One-click install
npx skills add https://github.com/UlaYuga/promo-preflight --skill xlsx-ulayuga
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/UlaYuga/promo-preflight/tree/main/.agents/skills/xlsx
Command: npx skills add https://github.com/UlaYuga/promo-preflight --skill xlsx-ulayuga

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 every deliverable contains live formulas, zero errors, and professional formatting. ## Core Features & Use Cases - Formula-first spreadsheet creation: Build workbooks with openpyxl where all calculations are native Excel formulas, never hardcoded Python results, so files stay dynamic and updateable. - Mandatory recalculation and error scanning: The scripts/recalc.py tool uses LibreOffice to recalculate all formulas and returns JSON reporting every #REF!, #DIV/0!, #VALUE!, #NAME?, and #N/A error with exact cell locations. - Financial modeling conventions: Enforces industry-standard color coding (blue inputs, black formulas, green cross-sheet links), number formatting, and documented sources for hardcoded values. - Use Case: A user pastes raw quarterly sales data and asks for a revenue forecast model. The Skill builds a workbook with assumption cells, growth formulas, and proper currency formatting, then recalculates and verifies zero formula errors before delivery. ## Quick Start Use the xlsx skill to create a financial model spreadsheet from my sales data with growth 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. Formulas are stored but not evaluated by openpyxl, so recalculate them with LibreOffice using the recalc.py script to produce computed values.

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 that must preserve styles.

Why do my openpyxl formulas show no calculated values?▼

openpyxl stores formulas as strings without evaluating them, so cells appear empty when read with data_only=True. Recalculate the file with LibreOffice through scripts/recalc.py, which computes all formulas and reports any errors as JSON.

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

Run scripts/recalc.py on the workbook; it scans every cell and returns JSON listing each error type with exact sheet and cell locations. Fix invalid references for #REF! and guard denominators against zero for #DIV/0!, then recalculate again.

Can openpyxl edit an existing Excel template without losing formatting?▼

Yes, load the file with load_workbook and modify cells in place; existing styles and formulas are preserved. Avoid saving a workbook opened with data_only=True, since that permanently replaces formulas with their cached values.