Excel MCP Outil

VérifiéSûr

Ensemble d'outils MCP pour lire, écrire et formater des fichiers Excel, avec deux modes : workbook (Excel ouvert) et path (fichier fermé).

Spar Skills Guide Bot
Data & IAIntermédiaire
1025/07/2026
Claude Code
#excel#data-manipulation#spreadsheet#automation#mcp

Recommandé pour

Notre avis

Fournit des outils pour lire, écrire et mettre en forme des fichiers Excel via MCP, prenant en charge les classeurs ouverts et les fichiers .xlsx fermés.

Points forts

  • Prend en charge la manipulation en direct d'Excel via xlwings ainsi que l'édition de fichiers .xlsx sans Excel
  • Offre un formatage cellulaire précis incluant bordures, couleurs et formats de nombre
  • Permet l'exécution de macros VBA sur des classeurs ouverts

Limites

  • Le mode chemin ne fonctionne qu'avec les fichiers .xlsx (pas .xls ni .csv)
  • Les modifications en mode chemin ne sont pas immédiatement visibles dans une instance Excel ouverte
  • Les opérations complexes peuvent nécessiter l'écriture manuelle de scripts VBA
Quand l'utiliser

Utilisez-le lorsque vous devez lire, écrire ou formater des données dans des fichiers Excel de manière programmatique.

Quand l'éviter

Évitez pour l'édition collaborative en temps réel ou avec des formats de tableur non Excel comme CSV.

Analyse de sécurité

Sûr
Score qualité95/100

The skill only documents MCP tools for Excel file manipulation. It does not instruct or imply any execution of arbitrary system commands, network requests, or destructive operations. No obfuscated or risky patterns are present.

Aucun point d'attention détecté

Exemples

Read a range from a closed file
Read the values and formats of cells A1 to C10 from the Excel file at /path/to/workbook.xlsx. Use the 'path' mode.
Write data and apply formatting
Write the following table to Sheet1!A1:D4 in /data/sales.xlsx and format the header row bold with blue font and thin borders around the table. Use path mode.

Header: Name, Q1, Q2, Q3
Row1: Alice, 100, 150, 200
Row2: Bob, 90, 110, 130
Row3: Charlie, 120, 140, 160
Execute a VBA macro on an open workbook
Run the VBA macro named 'SortData' on the workbook 'Budget.xlsx' that is currently open in Excel. The macro is stored in a module named 'Module1'. Use workbook mode.

Excel MCP Skill

Excel ファイルの読み書き・書式設定を行うための MCP ツール群。

2つのモード

  • workbook — 開いている Excel ブックをリアルタイム操作(xlwings)
  • path — 閉じた .xlsx ファイルを直接編集(Excel 不要、画像・グラフを壊さない)

どちらか一方を指定する。両方指定しない。

基本フロー

閉じたファイルを扱う場合

  1. read_cells で現状を確認(path, range, formats=true)
  2. write_cells で値を書き込む(path, range, value)
  3. format_cells で書式を整える(path, range, format)

開いている Excel を扱う場合

  1. get_excel_info でブック名・シート名を取得
  2. read_cells / write_cells / format_cells を workbook 指定で使う
  3. 複雑な操作は execute_vba で VBA を実行(開いている時のみ)

ツール早見表

| ツール | workbook | path | 必須パラメータ | |--------|:--------:|:----:|---------------| | get_excel_info | - | - | なし | | read_cells | OK | OK | range | | write_cells | OK | OK | range, value | | format_cells | OK | OK | range, format | | execute_vba | OK | ✕ | workbook, code |

value の指定方法

単一値:      "hello"  /  42  /  true
1行:         ["A", "B", "C"]
複数行:      [["A1","B1"], ["A2","B2"]]
1列:         range="A1:A3", value=["x","y","z"]

range のサイズと value の形状を合わせる。単一値を範囲に書くと全セルに同じ値が入る。

format の指定方法

{
  "bold": true,
  "fontSize": 14,
  "fontColor": "#FF0000",
  "backgroundColor": "#FFFF00",
  "textAlign": "center",
  "numberFormat": "#,##0",
  "borders": {
    "outside": { "style": "thin", "color": "#000000" }
  }
}

使えるプロパティ: bold, italic, underline, fontSize, fontName, fontColor, backgroundColor, textAlign (left/center/right), verticalAlign (top/middle/bottom), numberFormat, wrapText, borders

borders の位置: top, bottom, left, right, inside, outside borders の style: thin, medium, thick, double, dotted, dashed, none

注意点

  • path モードは .xlsx 形式のみ対応(.xls, .csv は不可)
  • path モードで編集してもExcelには即反映されない(ファイルを開き直す必要あり)
  • execute_vba は開いているブック専用。閉じたファイルには使えない
  • sheet を省略すると最初のシート(またはアクティブシート)が対象
  • 大きな範囲を一度に読むより、必要な範囲だけ指定する方が高速
Skills similaires