xlsx Skill for AI Agents
by Anthropic
Spreadsheet creation, editing, and analysis with formulas and visualization. Use when working with Excel files (.xlsx) for financial models, data analysis, reports, or any spreadsheet tasks requiring formulas, formatting, and data manipulation.
47downloads
Updated
About this Skill
The xlsx skill enables AI agents like Claude and ChatGPT to spreadsheet creation, editing, and analysis with formulas and visualization. use when working with excel files (.xlsx) for financial models, data analysis, reports, or any spreadsheet tasks requiring formulas, formatting, and data manipulation.
SKILLS.md Content
# XLSX Processing
Comprehensive toolkit for creating, editing, and analyzing Excel spreadsheets.
## Core Standards
- **Zero formula errors** in all Excel deliverables
- Industry-standard color coding for financial models
### Color Coding Convention
- Blue text (RGB: 0,0,255) - Inputs/assumptions
- Black text - Formulas and calculations
- Green text - Internal links
- Red text - External references
## Critical Workflow Rule
**Use formulas, never hardcoded values.**
Always use Excel formulas instead of calculating values in Python and hardcoding them. This maintains spreadsheet dynamism.
```python
# CORRECT - Use formula
cell.value = "=SUM(B2:B9)"
# INCORRECT - Hardcoded calculation
cell.value = calculated_sum
```
## Technical Requirements
### Recalculation
After creating/editing files with formulas, recalculate to verify:
- Values compute correctly
- No formula errors exist
### Number Formatting
- Years as text: "2024"
- Currency: $#,##0
- Zeros displayed as: "-"
- Percentages: 0.0%
### Documentation
Hardcoded values require source citations:
- Date of data
- Reference name
- URL when available
## Library Selection
- **openpyxl** - For formulas and formatting
- **pandas** - For data analysis and manipulation
## Formula Best Practices
1. Test 2-3 sample references before broader application
2. Use named ranges for clarity
3. Document complex formulas with comments
4. Verify formula integrity with checklist
## Template Preservation
Preserve existing templates over imposing standardized formatting. Respect the structure users have created.