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. Trigger when the user references a spreadsheet file by name or path.
Always use Excel formulas instead of calculating in Python and hardcoding results.
# ❌ WRONG
total = df['Sales'].sum()
sheet['B10'] = total
# ✅ CORRECT
sheet['B10'] = '=SUM(B2:B9)'
| Task | Tool |
|---|---|
| Data analysis | pandas |
| Formulas & formatting | openpyxl |
| Formula recalculation | python scripts/recalc.py output.xlsx |
python scripts/recalc.py output.xlsxfrom openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
wb = Workbook()
sheet = wb.active
sheet['A1'] = 'Revenue'
sheet['B2'] = '=SUM(A1:A10)'
sheet['A1'].font = Font(bold=True)
sheet.column_dimensions['A'].width = 20
wb.save('output.xlsx')
import pandas as pd
df = pd.read_excel('file.xlsx')
all_sheets = pd.read_excel('file.xlsx', sheet_name=None)
$#,##0 with units in headers0.0%(123) not -123pd.notna()From anthropics/skills xlsx skill (Proprietary — see LICENSE.txt in source repo for terms).