excel-toolkit
Skill8 starsChanged 9 months agoMITView on GitHub
Read, edit, analyze, and create Microsoft Excel files (.xlsx, .xls, .xlsm, .csv, .tsv). Use when a user asks to: (1) Open/read/inspect an Excel file, (2) Edit or modify spreadsheet data, formulas, or formatting, (3) Analyze spreadsheet data and provide insights, statistics, or trends, (4) Create new Excel files with data, formulas, charts, or formatting, (5) Convert between CSV/TSV and Excel formats, (6) Build financial models or dashboards in Excel.
In this repository6 other files it gives its agents.
- agent-councilSkill
- brainstormingSkill
- building-frontend-componentsSkill
- powerpoint-toolkitSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Run the dependency installer before any Excel operation:
- Very specific: line 109
Run scripts/inspect_excel.py to understand structure
- Very specific: line 110
Run scripts/analyze_excel.py --correlations for numeric data
- Very specific: line 120
When creating dashboard/insights sheets with tables and charts, you MUST follow the layout rules in references/advanced-patterns.md → …
- Distinctive: line 123
Reserve 17-20 rows: after each chart anchor for chart height
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Excel Toolkit
Setup (First Use)
Run the dependency installer before any Excel operation:
python3 scripts/setup_deps.pyInstalls: openpyxl, pandas, xlsxwriter, matplotlib. Skip if already installed.
Workflow Selection
- Inspect a file → Run
scripts/inspect_excel.py - Analyze data / get insights → Run
scripts/analyze_excel.py - Read data for processing → Use pandas in inline Python
- Edit existing file → Use openpyxl (preserves formulas/formatting)
- Create new file → Use openpyxl (formulas/formatting) or pandas (data export)
- Recalculate formulas → Run
scripts/recalc.py
Quick-Start Scripts
Inspect File Structure
python3 scripts/inspect_excel.py data.xlsx # Structure only
python3 scripts/inspect_excel.py data.xlsx --data # With data preview
python3 scripts/inspect_excel.py data.xlsx --sheet "Sales" # Specific sheet
python3 scripts/inspect_excel.py data.xlsx --data --rows 50 # More preview rowsReturns JSON: sheet names, dimensions, headers, column types, optional data preview.
Analyze Data
python3 scripts/analyze_excel.py data.xlsx # Basic stats
python3 scripts/analyze_excel.py data.xlsx --correlations # With correlations
python3 scripts/analyze_excel.py data.xlsx --sheet "Revenue" # Specific sheetReturns JSON: shape, dtypes, missing values, numeric stats, categorical summaries, duplicates, date ranges.
Recalculate Formulas
python3 scripts/recalc.py output.xlsx [timeout_seconds]Requires LibreOffice. Returns JSON with formula errors and locations.
Reading Data
import pandas as pd
df = pd.read_excel('file.xlsx') # First sheet
df = pd.read_excel('file.xlsx', sheet_name='Sales') # Named sheet
all_sheets = pd.read_excel('file.xlsx', sheet_name=None) # All sheets as dict
df = pd.read_excel('file.xlsx', dtype={'id': str}) # Force typesCreating / Editing
Create New
from openpyxl import Workbook
from openpyxl.styles import Font, PatternFill, Alignment
wb = Workbook()
ws = wb.active
ws.title = "Data"
ws['A1'] = 'Category'
ws['A1'].font = Font(bold=True)
ws.append(['Sales', 1500])
ws['B3'] = '=SUM(B2:B2)'
ws.column_dimensions['A'].width = 18
wb.save('output.xlsx')Edit Existing
from openpyxl import load_workbook
wb = load_workbook('existing.xlsx') # preserves formulas
ws = wb['Sheet1']
ws['A1'] = 'Updated'
ws.insert_rows(2)
wb.save('modified.xlsx')Critical Rules
- Use Excel formulas, not hardcoded calculations
- ❌
ws['B10'] = df['Sales'].sum() - ✅
ws['B10'] = '=SUM(B2:B9)'
- ❌
- Recalculate after writing formulas — openpyxl writes formula strings but doesn't evaluate:
python3 scripts/recalc.py output.xlsx - Never save workbooks opened with
data_only=True— destroys all formulas permanently. - Preserve existing formatting — use
load_workbook()and match existing conventions.
Providing Insights
When analyzing data:
- Run
scripts/inspect_excel.pyto understand structure - Run
scripts/analyze_excel.py --correlationsfor numeric data - Present findings:
- Overview: rows, columns, data types
- Key Statistics: means, medians, ranges
- Data Quality: missing values, duplicates, anomalies
- Patterns: correlations, trends, distributions
- Actionable Insights: what stands out, recommendations
Building Dashboards & Insights Sheets
When creating dashboard/insights sheets with tables and charts, you MUST follow the layout rules in references/advanced-patterns.md → "Dashboard Layout & Spacing":
- Use a running ROW counter — never hardcode row positions for sections/charts
- Reserve 17-20 rows after each chart anchor for chart height
- Leave 2 blank rows between tables and charts
- Set chart dimensions explicitly — use the sizing guide for each chart type
- Apply consistent styling — title/section/header fonts, zebra striping, thin borders
- Use the standard color palette — BLUE for primary, ORANGE for secondary, RED for warnings
- Set column widths — use the defaults table for readable layouts
Advanced Features
For charts, conditional formatting, pivot tables, data validation, CSV conversion, dashboard layout, and large file handling → see references/advanced-patterns.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

