Loading...
Loading...
Automate Microsoft Excel on Windows via COM interop. Use when creating, reading, or modifying Excel workbooks. Supports Power Query (M code), Data Model (DAX measures), PivotTables, Tables, Ranges, Charts, Slicers, Formatting, VBA macros, connections, and calculation mode control. Triggers: Excel, spreadsheet, workbook, xlsx, Power Query, DAX, PivotTable, VBA.
npx skill4agent add sbroenne/mcp-server-excel excel-mcpC:\Users\Name\Documents\Report.xlsxexcel_calculation_mode1. excel_calculation_mode(action: 'set-mode', mode: 'manual') → Disable auto-recalc
2. Perform all writes (excel_range set-values, set-formulas)
3. excel_calculation_mode(action: 'calculate', scope: 'workbook') → Recalculate once
4. excel_calculation_mode(action: 'set-mode', mode: 'automatic') → Restore defaultexcel_range get-formulas| Bad (Asking) | Good (Discovering) |
|---|---|
| "Which Excel file should I use?" | |
| "What's the table name?" | |
| "Which sheet has the data?" | |
| "Should I create a PivotTable?" | YES - create it on a new sheet |
| Data Type | Format Code | Result |
|---|---|---|
| USD | | $1,234.56 |
| EUR | | €1,234.56 |
| Percent | | 15.00% |
| Date (ISO) | | 2025-01-22 |
1. excel_range set-values (data is now in cells)
2. excel_range_format set-number-format (apply format)1. excel_range set-values (write data including headers)
2. excel_table create tableName="SalesData" rangeAddress="A1:D100"1. excel_file(action: 'open', excelPath: '...') → sessionId
2. All operations use sessionId
3. excel_file(action: 'close', save: true) → saves and closesStep 1: Create table → Table exists
Step 2: excel_table(action: 'add-to-datamodel') → Table in Data Model
Step 3: excel_datamodel(action: 'create-measure') → NOW this works1. excel_powerquery(action: 'evaluate', mCode: '...') → Test WITHOUT persisting
2. excel_powerquery(action: 'create', ...) → Store validated query
3. excel_powerquery(action: 'refresh', ...) → Load dataset-valuesA5:C5{
"success": false,
"errorMessage": "Table 'Sales' not found in Data Model",
"suggestedNextActions": ["excel_table(action: 'add-to-datamodel', tableName: 'Sales')"]
}excel_calculation_mode1. excel_calculation_mode(action: 'set-mode', mode: 'manual') → Disable auto-recalc
2. Perform data writes (excel_range set-values, set-formulas)
3. excel_calculation_mode(action: 'calculate', scope: 'workbook') → Recalculate once at end
4. excel_calculation_mode(action: 'set-mode', mode: 'automatic') → Restore default| Task | Tool | Key Action |
|---|---|---|
| Create/open/save workbooks | | open, create, close |
| Write/read cell data | | set-values, get-values |
| Format cells | | set-number-format |
| Create tables from data | | create |
| Add table to Power Pivot | | add-to-datamodel |
| Create DAX formulas | | create-measure |
| Create PivotTables | | create, create-from-datamodel |
| Filter with slicers | | set-slicer-selection |
| Create charts | | create-from-range |
| Control calculation mode | | get-mode, set-mode, calculate |
references/