Supports reading, creating, and modifying .xlsx, .xlsm, .csv, and .tsv files with full formula preservation and recalculation
Includes financial modeling standards: color-coded text (blue for inputs, black for formulas, green for internal links, red for external links), currency formatting, and assumption-based formula construction
Provides data analysis capabilities via pandas for statistics
Confirm successful installation by checking the skill directory location:
.cursor/skills/xlsx
Restart Cursor to activate xlsx. Access via /xlsx in your agent's command palette.
โ
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
A user may ask you to create, edit, or analyze the contents of an .xlsx file. You have different tools and workflows available for different tasks.
Important Requirements
LibreOffice Required for Formula Recalculation: You can assume LibreOffice is installed for recalculating formula values using the recalc.py script. The script automatically configures LibreOffice on first run
Reading and analyzing data
Data analysis with pandas
For data analysis, visualization, and basic operations, use pandas which provides powerful data manipulation capabilities:
import pandas as pd
# Read Exceldf = pd.read_excel('file.xlsx')# Default: first sheetall_sheets = pd.read_excel('file.xlsx', sheet_name=None)# All sheets as dict# Analyzedf.head()# Preview datadf.info()# Column infodf.describe()# Statistics# Write Exceldf.to_excel('output.xlsx', index=False)
Excel File Workflows
CRITICAL: Use Formulas, Not Hardcoded Values
Always use Excel formulas instead of calculating values in Python and hardcoding them. This ensures the spreadsheet remains dynamic and updateable.
โ WRONG - Hardcoding Calculated Values
# Bad: Calculating in Python and hardcoding resulttotal = df['Sales'].sum()sheet['B10']= total # Hardcodes 5000# Bad: Computing growth rate in Pythongrowth =(df.iloc[-1]['Revenue']- df.iloc[0]['Revenue'])/ df.iloc[0]['Revenue']sheet['C5']= growth # Hardcodes 0.15# Bad: Python calculation for averageavg =sum(values)/len(values)sheet['D20']= avg # Hardcodes 42.5
โ CORRECT - Using Excel Formulas
# Good: Let Excel calculate the sumsheet['B10']='=SUM(B2:B9)'# Good: Growth rate as Excel formulasheet['C5']='=(C4-C2)/C2'# Good: Average using Excel functionsheet['D20']='=AVERAGE(D2:D19)'
This applies to ALL calculations - totals, percentages, ratios, differences, etc. The spreadsheet should be able to recalculate when source data changes.
Common Workflow
Choose tool: pandas for data, openpyxl for formulas/formatting
Create/Load: Create new workbook or load existing file
Modify: Add/edit data, formulas, and formatting
Save: Write to file
Recalculate formulas (MANDATORY IF USING FORMULAS): Use the recalc.py script
python recalc.py output.xlsx
Verify and fix any errors:
The script returns JSON with error details
If status is errors_found, check error_summary for specific error types and locations
Fix the identified errors and recalculate again
Common errors to fix:
#REF!: Invalid cell references
#DIV/0!: Division by zero
#VALUE!: Wrong data type in formula
#NAME?: Unrecognized formula name
Creating new Excel files
# Using openpyxl for formulas and formattingfrom openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
wb = Workbook()sheet = wb.active
# Add datasheet['A1']='Hello'sheet['B1']='World'sheet.append(['Row','of','data'])# Add formulasheet['B2']='=SUM(A1:A10)'# Formattingsheet['A1'].font = Font(bold=True, color='FF0000')sheet['A1'].fill = PatternFill('solid', start_color='FFFF00')sheet['A1'].alignment = Alignment(horizontal='center')# Column widthsheet.column_dimensions['A'].width =20wb.save('output.xlsx')
Editing existing Excel files
# Using openpyxl to preserve formulas and formattingfrom openpyxl import load_workbook
# Load existing filewb = load_workbook('existing.xlsx')sheet = wb.active # or wb['SheetName'] for specific sheet# Working with multiple sheetsfor sheet_name in wb.sheetnames: sheet = wb[sheet_name]print(f"Sheet: {sheet_name}")# Modify cellssheet['A1']='New Value'sheet.insert_rows(2)# Insert row at position 2sheet.delete_cols(3)# Delete column 3# Add new sheetnew_sheet = wb.create_sheet('NewSheet')new_sheet['A1']='Data'wb.save('modified.xlsx')
Recalculating formulas
Excel files created or modified by openpyxl contain formulas as strings but not calculated values. Use the provided recalc.py script to recalculate formulas:
python recalc.py <excel_file>[timeout_seconds]
Example:
python recalc.py output.xlsx 30
The script:
Automatically sets up LibreOffice macro on first run
Recalculates all formulas in all sheets
Scans ALL cells for Excel errors (#REF!, #DIV/0!, etc.)
Returns JSON with detailed error locations and counts
Works on both Linux and macOS
Formula Verification Checklist
Quick checks to ensure formulas work correctly:
Essential Verification
Test 2-3 sample references: Verify they pull correct values before building full model
Column mapping: Confirm Excel columns match (e.g., column 64 = BL, not BK)
NaN handling: Check for null values with pd.notna()
Far-right columns: FY data often in columns 50+
Multiple matches: Search all occurrences, not just first
Division by zero: Check denominators before using / in formulas (#DIV/0!)
Wrong references: Verify all cell references point to intended cells (#REF!)
Cross-sheet references: Use correct format (Sheet1!A1) for linking sheets
Formula Testing Strategy
Start small: Test formulas on 2-3 cells before applying broadly
Verify dependencies: Check all cells referenced in formulas exist
Test edge cases: Include zero, negative, and very large values
Interpreting recalc.py Output
The script returns JSON with error details:
{"status":"success",// or "errors_found""total_errors":0,// Total error count
Implementation Guide
Prerequisites
โบClaude Desktop or compatible AI client with skill support
โบClear understanding of task or problem to solve
โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate into regular workflow if valuable
Common Pitfalls
โ Expecting perfect results without iteration
โ Not providing enough context in prompts
โ Using skill for tasks outside its intended scope
โ Accepting outputs without review and validation
Best Practices
โ Do
+Start with clear, specific prompts
+Provide relevant context and constraints
+Review and refine all outputs before using
+Iterate to improve output quality
+Document successful prompt patterns
โ Don't
โDon't use without understanding skill limitations
โDon't skip validation of outputs
โDon't share sensitive information in prompts
โDon't expect skill to replace human judgment
๐ก Pro Tips
โ Be specific about desired format and style
โ Ask for multiple options to choose from
โ Request explanations to understand reasoning
โ Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation