skills/asmayaseen/working-with-spreadsheets/SKILL.md
Creates and edits Excel spreadsheets with formulas, formatting, and financial modeling standards. Use when working with .xlsx files, financial models, data analysis, or formula-heavy spreadsheets. Covers formula recalculation, color coding standards, and common pitfalls.
npx skillsauth add aiskillstore/marketplace working-with-spreadsheetsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
from openpyxl import Workbook
wb = Workbook()
sheet = wb.active
sheet['A1'] = 'Revenue'
sheet['B1'] = 1000
sheet['B2'] = '=B1*1.1' # Use formulas, not hardcoded values!
wb.save('output.xlsx')
Always use Excel formulas instead of calculating in Python.
# WRONG - Hardcoding calculated values
total = df['Sales'].sum()
sheet['B10'] = total # Hardcodes 5000
# CORRECT - Using Excel formulas
sheet['B10'] = '=SUM(B2:B9)'
| Color | RGB | Usage | |-------|-----|-------| | Blue text | 0,0,255 | Hardcoded inputs, scenario values | | 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 |
from openpyxl.styles import Font
# Input cell (user changeable)
sheet['B5'].font = Font(color='0000FF') # Blue
# Formula cell
sheet['C5'] = '=B5*1.1'
sheet['C5'].font = Font(color='000000') # Black
# Cross-sheet link
sheet['D5'] = "=Sheet2!A1"
sheet['D5'].font = Font(color='008000') # Green
# Currency with thousands separator
sheet['B5'].number_format = '$#,##0'
# Zeros display as dash
sheet['B5'].number_format = '$#,##0;($#,##0);-'
# Percentages with one decimal
sheet['C5'].number_format = '0.0%'
# Valuation multiples
sheet['D5'].number_format = '0.0x'
# Years as text (not 2,024)
sheet['A1'] = '2024' # String, not number
| Task | Library | Example |
|------|---------|---------|
| Data analysis | pandas | df = pd.read_excel('file.xlsx') |
| Formulas & formatting | openpyxl | sheet['A1'] = '=SUM(B:B)' |
| Large files (read) | openpyxl | load_workbook('file.xlsx', read_only=True) |
| Large files (write) | openpyxl | Workbook(write_only=True) |
import pandas as pd
from openpyxl import load_workbook
# pandas - data analysis
df = pd.read_excel('file.xlsx')
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # Dict of DataFrames
# openpyxl - preserve formulas
wb = load_workbook('file.xlsx')
sheet = wb.active
print(sheet['A1'].value) # Returns formula string
# openpyxl - get calculated values (WARNING: loses formulas on save!)
wb = load_workbook('file.xlsx', data_only=True)
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
wb = Workbook()
sheet = wb.active
sheet.title = 'Model'
# Headers
sheet['A1'] = 'Metric'
sheet['B1'] = '2024'
sheet['A1'].font = Font(bold=True)
# Data with formulas
sheet['A2'] = 'Revenue'
sheet['B2'] = 1000000
sheet['B2'].font = Font(color='0000FF') # Blue = input
sheet['A3'] = 'Growth'
sheet['B3'] = '=B2*0.1'
sheet['B3'].font = Font(color='000000') # Black = formula
# Formatting
sheet['B2'].number_format = '$#,##0'
sheet.column_dimensions['A'].width = 20
wb.save('model.xlsx')
from openpyxl import load_workbook
wb = load_workbook('existing.xlsx')
sheet = wb['Data'] # Or wb.active
# Modify cells
sheet['A1'] = 'Updated Value'
sheet.insert_rows(2)
sheet.delete_cols(3)
# Add new sheet
new_sheet = wb.create_sheet('Analysis')
new_sheet['A1'] = '=Data!B5' # Cross-sheet reference
wb.save('modified.xlsx')
openpyxl writes formulas but doesn't calculate values. Use LibreOffice to recalculate:
# Recalculate and check for errors
python recalc.py output.xlsx
The script returns JSON:
{
"status": "success", // or "errors_found"
"total_errors": 0,
"total_formulas": 42,
"error_summary": {
"#REF!": {"count": 2, "locations": ["Sheet1!B5", "Sheet1!C10"]}
}
}
pd.notna() before using valuesSheet1!A1)recalc.py and fix any errors| Error | Cause | Fix |
|-------|-------|-----|
| #REF! | Invalid cell reference | Check deleted rows/columns |
| #DIV/0! | Division by zero | Add IF check: =IF(B5=0,0,A5/B5) |
| #VALUE! | Wrong data type | Check cell contains expected type |
| #NAME? | Unknown function | Check spelling, quotes around text |
Run: python scripts/verify.py
building-nextjs-apps - Frontend for spreadsheet uploadsscaffolding-fastapi-dapr - API for spreadsheet processingdevelopment
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.