# XLSX

Use this skill any time a spreadsheet file is the primary input or output.

- Repository: https://github.com/mateaix/mateclaw (1176 stars)
- Category: Documents
- License: Apache-2.0
- Last updated: 2026-10-30
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add mateaix/mateclaw --skill xlsx -g -a claude-code -y`
Codex: `npx skills add mateaix/mateclaw --skill xlsx -g -a codex -y`
Cursor: `npx skills add mateaix/mateclaw --skill xlsx -g -a cursor -y`
Gemini CLI: `npx skills add mateaix/mateclaw --skill xlsx -g -a gemini-cli -y`

## Description

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file; create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Also trigger for cleaning or restructuring messy tabular data. The deliverable must be a spreadsheet file.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

> **Important:** All `scripts/` paths are relative to this skill directory.
> Use `run_skill_script` tool to execute scripts, or run with: `cd {this_skill_dir} && python scripts/...`

# Requirements for Outputs

## All Excel files

### Professional Font
- Use a consistent, professional font (e.g., Arial, Times New Roman) unless otherwise instructed

### Zero Formula Errors
- Every Excel model MUST be delivered with ZERO formula errors (#REF!, #DIV/0!, #VALUE!, #N/A, #NAME?)

### Preserve Existing Templates
- Study and EXACTLY match existing format, style, and conventions when modifying files
- Existing template conventions ALWAYS override these guidelines

## Financial Models

### Color Coding Standards

- **Blue text (0,0,255)**: Hardcoded inputs
- **Black text (0,0,0)**: ALL formulas and calculations
- **Green text (0,128,0)**: Links from other worksheets
- **Red text (255,0,0)**: External links to other files
- **Yellow background (255,255,0)**: Key assumptions needing attention

### Number Formatting Standards

- **Years**: Format as text strings ("2024" not "2,024")
- **Currency**: Use $#,##0 format; specify units in headers ("Revenue ($mm)")
- **Zeros**: Format as "-" including percentages
- **Percentages**: Default to 0.0% format
- **Multiples**: Format as 0.0x
- **Negative numbers**: Use parentheses (123) not minus -123

### Formula Construction Rules

- Place ALL assumptions in separate assumption cells
- Use cell references instead of hardcoded values
- Example: Use `=B5*(1+$B$6)` instead of `=B5*1.05`

# XLSX creation, editing, and analysis

## Prerequisites

- **openpyxl**: Excel file creation and editing
- **pandas**: data analysis and bulk operations
- **LibreOffice** (`soffice`): formula recalculation via `scripts/recalc.py`

## CRITICAL: Use Formulas, Not Hardcoded Values

**Always use Excel formulas instead of calculating values in Python and hardcoding them.**

The rest: https://github.com/mateaix/mateclaw/blob/HEAD/mateclaw-server/src/main/resources/skills/xlsx/SKILL.md
