xlsx

Create, edit, and analyze Excel spreadsheets with formulas, formatting, and recalculation.

Updated Jul 30, 2026
One-click install
npx skills add https://github.com/johsquaree/claude-basic-docs --skill xlsx-johsquaree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xlsx
Source: https://github.com/johsquaree/claude-basic-docs/tree/main/.claude/skills/document-skills/xlsx
Command: npx skills add https://github.com/johsquaree/claude-basic-docs --skill xlsx-johsquaree

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openpyxl, and includes scripts (resource) components.

What problem does it solve? Working with spreadsheets programmatically often leads to broken formulas, hardcoded values that can't update, and inconsistent formatting. This Skill provides a complete workflow for creating, editing, and analyzing Excel files (.xlsx, .xlsm, .csv, .tsv) while preserving formulas, enforcing financial modeling conventions, and guaranteeing zero formula errors. ## Core Features & Use Cases - Spreadsheet Creation & Editing: Build new workbooks or modify existing ones with openpyxl while preserving formulas, styles, and template conventions. - Formula Recalculation & Error Detection: Use the included recalc.py script with LibreOffice to recalculate all formulas and scan every cell for errors like #REF!, #DIV/0!, and #VALUE!. - Financial Modeling Standards: Apply industry-standard color coding (blue inputs, black formulas, green cross-sheet links), number formatting, and assumption documentation. - Data Analysis: Read and analyze spreadsheet data with pandas for statistics, filtering, and bulk operations. - Use Case: Build a three-statement financial model where all projections use live Excel formulas referencing assumption cells, then recalculate and verify the workbook contains zero formula errors before delivery. ## Quick Start Ask the AI to create an Excel financial model with formulas for revenue projections and recalculate it to verify 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 create a workbook and assign formula strings like '=SUM(B2:B9)' directly to cells, then save the file. Always use Excel formulas instead of hardcoding Python-calculated values so the spreadsheet recalculates when source data changes.

How do I recalculate Excel formulas after editing with openpyxl?

openpyxl stores formulas as strings without computed values, so run the recalc.py script with LibreOffice to recalculate all formulas. The script returns JSON with error counts and cell locations for any #REF!, #DIV/0!, or #VALUE! errors found.

Should I use pandas or openpyxl for Excel files?

Use pandas for data analysis, bulk operations, and simple exports, and openpyxl for complex formatting, formulas, and Excel-specific features. openpyxl preserves existing formulas and styles when editing templates, while pandas is faster for reading and transforming tabular data.

Why does my Excel file show #REF! or #DIV/0! errors?

#REF! errors come from invalid cell references, often caused by off-by-one row offsets since Excel rows are 1-indexed. #DIV/0! occurs when denominators are zero, so check divisor cells before using division in formulas and verify column mappings carefully.

Does openpyxl preserve formulas when editing existing spreadsheets?

Yes, openpyxl preserves formulas when loading and saving files normally. However, loading with data_only=True and then saving permanently replaces formulas with their cached values, so only use data_only=True for reading calculated values.