xlsx

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

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/NT-boop-star/BRMV-tract --skill xlsx-nt-boop-star
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/NT-boop-star/BRMV-tract/tree/main/antigravity/skills/xlsx
Command: npx skills add https://github.com/NT-boop-star/BRMV-tract --skill xlsx-nt-boop-star

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 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 generation: Builds dynamic Excel files with real formulas (SUM, growth rates, ratios) instead of hardcoded Python-calculated values, so spreadsheets stay updateable. - Automated recalculation and error detection: The scripts/recalc.py tool uses LibreOffice to recalculate all formulas and reports exact cell locations of #REF!, #DIV/0!, #VALUE!, and other errors as JSON. - Financial modeling conventions: Enforces industry-standard color coding (blue inputs, black formulas, green cross-sheet links), number formatting, and assumption-cell placement for professional models. - Use Case: Ask the assistant to build a 5-year revenue projection model from a messy CSV export; it cleans the data, writes formulas referencing assumption cells, recalculates with LibreOffice, and fixes any formula errors before delivery. ## Quick Start Use the xlsx skill to create a financial model spreadsheet from my sales data CSV with formulas for totals and growth rates, then 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 calculates the values and reports any formula errors as JSON.

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 that preserve an existing file's structure.

Why do my openpyxl formulas show no calculated values?

openpyxl stores formulas as strings but never evaluates them. Recalculate with LibreOffice using scripts/recalc.py, which runs a macro that calls calculateAll, saves the file, and scans every cell for errors like #REF! and #DIV/0!.

Does reading Excel with data_only=True lose formulas?

Yes. Loading with data_only=True returns cached values, and saving that workbook permanently replaces formulas with values. Only use data_only=True for reading, and keep a separate load for editing.

What formatting conventions apply to financial models?

Use blue text for hardcoded inputs, black for formulas, green for cross-sheet links, and red for external file links. Format currency as $#,##0, percentages as 0.0%, negatives in parentheses, and place all assumptions in dedicated cells referenced by formulas.