xlsx

Create, edit, and recalculate Excel spreadsheets with openpyxl, pandas, and LibreOffice.

Updated Jun 21, 2025
One-click install
npx skills add https://github.com/seriiserii825/dotfiles --skill xlsx-seriiserii825
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/seriiserii825/dotfiles/tree/main/apps/claude/skills/synced/48e265c5-be08-4ca3-88ab-78707f398de7_1df978a8-b501-4d2b-b556-83317b565971/xlsx
Command: npx skills add https://github.com/seriiserii825/dotfiles --skill xlsx-seriiserii825

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, pandas, markitdown, lxml, defusedxml, and includes scripts (resource) components.

What problem does it solve? Working with spreadsheet files programmatically is error-prone: openpyxl writes formulas without cached values, modern Excel functions break under LibreOffice, and external workbook links get silently destroyed. This Skill provides the exact workflows, scripts, and gotchas needed to produce correct, professional .xlsx, .xlsm, .csv, and .tsv files every time. ## Core Features & Use Cases - Spreadsheet Creation & Editing: Build new workbooks or edit existing ones with openpyxl for formulas and formatting, or pandas for bulk data movement. - Mandatory Formula Recalculation: The included recalc.py script runs LibreOffice headless to compute every formula, then reports any #VALUE!, #REF!, or #NAME? errors as JSON so nothing ships broken. - Financial Modeling Conventions: Built-in rules for color coding (blue inputs, black formulas, green cross-sheet links), number formats, and assumption documentation. - Use Case: A user asks to add a revenue projection tab to an existing financial model. The Skill reads the model with two load_workbook passes, writes formulas referencing the assumptions sheet, runs recalc.py to verify zero errors, and delivers a workbook that recalculates correctly in Excel. ## Quick Start Use the xlsx skill to add a SUM formula column to my sales-data.xlsx file and verify it recalculates without 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 formulas as strings, such as sheet['B10'] = '=SUM(B2:B9)', rather than hardcoding computed values. After saving, run scripts/recalc.py so LibreOffice calculates every formula and caches the values, since openpyxl alone writes no cached results.

openpyxl vs pandas for reading Excel files?

Use pandas read_excel for bulk data in or out, and openpyxl when you need formulas, formatting, or cell-level edits. For a quick look at sheet contents, the markitdown command renders each sheet without cell coordinates.

Why do my Excel formulas show #NAME? after recalculation?

LibreOffice implements fewer functions than Excel, so post-2007 functions like TEXTJOIN or IFS need an _xlfn. prefix when written by openpyxl. Functions like XLOOKUP, FILTER, and UNIQUE cannot be evaluated at all and must be replaced with INDEX/MATCH or Python-side processing.

Does openpyxl preserve macros in .xlsm files?

Only if you pass keep_vba=True to load_workbook. Without that flag, saving an .xlsm file through openpyxl strips all macros permanently.

Why does data_only=True return None for all my formula cells?

openpyxl writes formulas without cached values, so data_only=True reads None until the file is recalculated. Run scripts/recalc.py first, and never save a workbook loaded with data_only=True because it replaces every formula with a literal.

When should I not use this spreadsheet skill?

Do not use it when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration. It applies only when the final deliverable is an actual spreadsheet file.