xlsx

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

Updated Aug 17, 2026
One-click install
npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill xlsx-prabaljainn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/prabaljainn/my-claude-code-setup/tree/main/claude/skills/xlsx
Command: npx skills add https://github.com/prabaljainn/my-claude-code-setup --skill xlsx-prabaljainn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Spreadsheet tasks often fail silently: formulas written by openpyxl have no cached values, unsupported functions become #NAME? errors, and re-saving a workbook can destroy external links. This Skill provides a verified workflow for producing spreadsheet files that actually recalculate correctly and follow professional formatting conventions. ## Core Features & Use Cases - Spreadsheet creation and editing: Build or modify .xlsx, .xlsm, .xltx, .csv, and .tsv files using openpyxl for formulas/formatting and pandas for bulk data movement. - Mandatory formula recalculation: scripts/recalc.py runs LibreOffice headless to compute every formula, rewrites the file in place, and reports JSON error summaries by cell location. - Financial model conventions: Enforces color coding for inputs vs formulas, number formats, and assumption documentation for professional models. - Use Case: A user asks to add a revenue projection with growth formulas to an existing workbook; the Skill writes the formulas, runs recalc.py, fixes any reported errors, and delivers a file whose values are verified rather than assumed. ## Quick Start Use the xlsx skill to open the attached sales-data.xlsx, add a column computing year-over-year growth with formulas, and recalculate the workbook.

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 directly into cells, such as sheet['B10'] = '=SUM(B2:B9)', rather than hardcoding computed values. After saving, recalculate the file with LibreOffice so formula cells contain cached values that other tools can read.

openpyxl vs pandas for Excel files: which should I use?▼

Use openpyxl when you need formulas, formatting, or cell-level edits, and pandas (read_excel, to_excel) for bulk data movement in and out of sheets. For a quick read-only look at a sheet's contents, markitdown renders each sheet without cell coordinates.

Why do openpyxl formulas show None when I read the file back?▼

openpyxl writes formulas as strings with no cached values, so data_only=True reads return None until the file is recalculated. Run a LibreOffice-based recalculation pass, which computes every formula and rewrites the file in place.

Which Excel functions cause #NAME? errors in LibreOffice?▼

Post-2007 functions like TEXTJOIN, IFS, and MAXIFS need an _xlfn. prefix to evaluate, while XLOOKUP, XMATCH, SORT, FILTER, UNIQUE, and SEQUENCE cannot be evaluated at all in this environment. Prefer Excel-2007-era functions such as SUMIFS, INDEX, MATCH, IFERROR, and SUMPRODUCT.

Does openpyxl preserve macros and external workbook links?▼

Macros in .xlsm files are lost unless you pass keep_vba=True to load_workbook. External links to other workbooks lose their cached values on save, so recalculation would resolve them to #NAME?; copy those values from the original file first.

Why does saving with data_only=True destroy my formulas?▼

A workbook loaded with data_only=True contains only cached values and no formulas, so saving it permanently replaces every formula with a literal value. Always edit on a normally loaded workbook and use a separate data_only load only for reading values.