Skip to content
Back to search

excel-mcp-server

A Model Context Protocol server for Excel file manipulation

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/haris-musa/excel-mcp-server with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/haris-musa/excel-mcp-server'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/haris-musa--excel-mcp-server/badge.svg)](/listings/haris-musa--excel-mcp-server)

HTML

<a href="/listings/haris-musa--excel-mcp-server"><img src="/api/listings/haris-musa--excel-mcp-server/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

You need [uv](https://docs.astral.sh/uv/getting-started/installation/). Every client runs the server with `uvx excel-mcp-server stdio`; replace `/path/to/workbooks` with the folder the server may use.

**Claude Desktop (Chat)**: download `excel-mcp-server-<version>.mcpb` from the [latest release](https://github.com/haris-musa/excel-mcp-server/releases/latest) and open it. Claude asks which folder the server may use.

**Claude Code** (the CLI, and the Code tab in Claude Desktop):

claude mcp add excel --scope user -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

**Cursor** (`~/.cursor/mcp.json`), and most clients that use an `mcpServers` config:

{
  "mcpServers": {
    "excel": {
      "command": "uvx",
      "args": ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/workbooks"]
    }
  }
}

**VS Code with GitHub Copilot** (`.vscode/mcp.json`, note the `servers` key):

{
  "servers": {
    "excel": {
      "type": "stdio",
      "command": "uvx",
      "args": ["excel-mcp-server", "stdio", "--allow-dir", "${workspaceFolder}"]
    }
  }
}

<details> <summary>OpenAI Codex, Gemini CLI, Devin Desktop, and Claude Desktop without the bundle</summary>

**OpenAI Codex** (CLI, IDE extension and app):

codex mcp add excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

**Gemini CLI**:

gemini mcp add -s user excel uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

**Devin Desktop**:

devin mcp add -s user excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks

**Claude Desktop, manual setup**: open Settings, Developer, Edit Config, add the `mcpServers` JSON above to `claude_desktop_config.json`, and restart Claude.

</details>

Desktop apps often cannot find `uvx`, because they do not see your shell's `PATH` (common on macOS). Use its full path instead, which `which uvx` prints.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 395 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <!-- mcp-name: io.github.haris-musa/excel-mcp-server -->
  2. <p align="center">
  3. <picture>
  4. <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/haris-musa/excel-mcp-server/main/assets/logo-dark.png">
  5. <img src="https://raw.githubusercontent.com/haris-musa/excel-mcp-server/main/assets/logo.png" alt="Excel MCP Server" width="420">
  6. </picture>
  7. </p>
  8. <p align="center">
  9. <a href="https://pypi.org/project/excel-mcp-server/"><img src="https://img.shields.io/pypi/v/excel-mcp-server.svg" alt="PyPI version"></a>
  10. <a href="https://pypi.org/project/excel-mcp-server/"><img src="https://img.shields.io/pypi/pyversions/excel-mcp-server.svg" alt="Python versions"></a>
  11. <a href="https://pepy.tech/project/excel-mcp-server"><img src="https://static.pepy.tech/badge/excel-mcp-server" alt="Downloads"></a>
  12. <a href="https://github.com/haris-musa/excel-mcp-server/actions/workflows/ci.yml"><img src="https://github.com/haris-musa/excel-mcp-server/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
  13. <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
  14. </p>
  15. <p align="center">
  16. <a href="https://trendshift.io/repositories/13975" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/13975" alt="haris-musa%2Fexcel-mcp-server | Trendshift" width="250" height="55"/></a>
  17. </p>
  18. # Excel MCP Server
  19. An open-source [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that lets
  20. Claude, Cursor, VS Code Copilot, Codex and other AI clients create, read and edit Excel files:
  21. charts, PivotTables, formulas, tables and more. It is built on `openpyxl`, needs **no Microsoft
  22. Excel**, and runs on Windows, macOS and Linux.
  23. **Install and try it at [excelmcpserver.com](https://excelmcpserver.com)**, or see
  24. [Quick start](#quick-start) below.
  25. ## Features
  26. **Charts and PivotTables**
  27. - Create Excel charts with AI: column, bar, line, area, pie, doughnut, radar, scatter and
  28. bubble, with combos, secondary axes, trendlines and error bars
  29. - The Excel 2016 chart types: waterfall, histogram, Pareto, box and whisker, treemap, sunburst
  30. and funnel
  31. - Real PivotTables that Excel refreshes (grouping, calculated fields, "show values as",
  32. layouts, filters), plus slicers and timelines for PivotTables and tables
  33. - Sparklines (line, column, win/loss)
  34. **Formulas and dynamic arrays**
  35. - Formulas are calculated without Excel by a built-in engine (479 functions, checked
  36. against more than 25,000 formulas recorded from real Excel), so `read_range` returns values
  37. for files that were never opened in Excel
  38. - Dynamic arrays (`FILTER`, `SORT`, `UNIQUE`, `SEQUENCE`, `LET`) are stored as Excel stores
  39. them and spill into the cells next to them
  40. - Find out why a number is wrong: trace precedents and dependents across sheets, names and
  41. tables, and evaluate a formula step by step as Excel's Evaluate Formula does
  42. - Goal Seek: change an input until a formula reaches the value you want
  43. **Data, tables and rules**
  44. - Read and write cells, dates and hyperlinks; tables with totals rows and calculated columns
  45. - Conditional formatting (scales, data bars, icon sets, top/bottom, duplicates, text, dates),
  46. data validation (dropdowns, limits, input messages)
  47. - Sort, filter (with criteria), find and replace, remove duplicates, text to columns, fill
  48. series, paste special
  49. - Fonts, fills, borders, number formats, merged cells, frozen panes, grouping, print setup,
  50. sheet protection, images, notes and defined names. Inserting or deleting rows and columns
  51. updates every reference, as in Excel
  52. **Large files**
  53. - Reads stream the workbook and return pages, so memory stays flat on sheets with hundreds of
  54. thousands of rows; every call is bounded by size and cell limits
  55. - Edits of a sheet of 1 MB of XML or more parse only the rows they touch, so inserting or
  56. deleting rows and columns, sorting, replacing, copying a sheet and creating a PivotTable
  57. take seconds on a 200,000-row sheet instead of minutes
  58. **Macros (opt-in)**
  59. - Read the VBA code in `.xlsm` files. Writing VBA is off unless you start the server with
  60. `--allow-vba-write`, which also decides whether `create_workbook` and `import_workbook` may
  61. make `.xlsm`/`.xltm` files; the server never runs macros
  62. **Safe by design**
  63. - Optional folder confinement, a formula safety check, read-only mode, localhost-only HTTP by
  64. default, and atomic saves that never leave a half-written file
  65. Works with `.xlsx`, `.xlsm` (macros are preserved), `.xltx` and `.xltm` files. Existing
  66. threaded comments, shapes, form controls and other content the tools cannot edit are kept as
  67. they are.
  68. ## Quick start
  69. You need [uv](https://docs.astral.sh/uv/getting-started/installation/). Every client runs the
  70. server with `uvx excel-mcp-server stdio`; replace `/path/to/workbooks` with the folder the
  71. server may use. [excelmcpserver.com](https://excelmcpserver.com) has the same steps with copy
  72. buttons and one-click install links for Cursor and VS Code.
  73. **Claude Desktop (Chat)**: download
  74. [`excel-mcp-server.mcpb`](https://github.com/haris-musa/excel-mcp-server/releases/latest/download/excel-mcp-server.mcpb)
  75. from the latest release and open it. Claude asks which folder the server may use.
  76. **Claude Code** (the CLI, and the Code tab in Claude Desktop):
  77. ```bash
  78. claude mcp add excel --scope user -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks
  79. ```
  80. **Cursor** (`~/.cursor/mcp.json`), and most clients that use an `mcpServers` config:
  81. ```json
  82. {
  83. "mcpServers": {
  84. "excel": {
  85. "command": "uvx",
  86. "args": ["excel-mcp-server", "stdio", "--allow-dir", "/path/to/workbooks"]
  87. }
  88. }
  89. }
  90. ```
  91. **VS Code with GitHub Copilot** (`.vscode/mcp.json`, note the `servers` key):
  92. ```json
  93. {
  94. "servers": {
  95. "excel": {
  96. "type": "stdio",
  97. "command": "uvx",
  98. "args": ["excel-mcp-server", "stdio", "--allow-dir", "${workspaceFolder}"]
  99. }
  100. }
  101. }
  102. ```
  103. <details>
  104. <summary>OpenAI Codex, Gemini CLI, Devin Desktop, and Claude Desktop without the bundle</summary>
  105. **OpenAI Codex** (CLI, IDE extension and app):
  106. ```bash
  107. codex mcp add excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks
  108. ```
  109. **Gemini CLI**:
  110. ```bash
  111. gemini mcp add -s user excel uvx excel-mcp-server stdio --allow-dir /path/to/workbooks
  112. ```
  113. **Devin Desktop**:
  114. ```bash
  115. devin mcp add -s user excel -- uvx excel-mcp-server stdio --allow-dir /path/to/workbooks
  116. ```
  117. **Claude Desktop, manual setup**: open Settings, Developer, Edit Config, add the `mcpServers`
  118. JSON above to `claude_desktop_config.json`, and restart Claude.
  119. </details>
  120. Desktop apps often cannot find `uvx`, because they do not see your shell's `PATH` (common
  121. on macOS). Use its full path instead, which `which uvx` prints.
  122. ## Choosing which files it can use
  123. With `--allow-dir DIR`, the server only opens workbooks inside `DIR` (subfolders included)
  124. and relative paths such as `reports/q1.xlsx` start there. Repeat the flag to allow several
  125. folders, or set `EXCEL_FILES_PATH` (separate folders with `:` on macOS/Linux and `;` on
  126. Windows).
  127. Without `--allow-dir`, any absolute path to an Excel file works. In every mode the server
  128. only touches Excel files and never silently overwrites an existing workbook.
  129. ## Remote use (Streamable HTTP)
  130. ```bash
  131. uvx excel-mcp-server streamable-http --allow-dir /srv/workbooks
  132. ```
  133. Clients connect to `http://127.0.0.1:8017/mcp`. Workbooks live in the `--allow-dir` folder
  134. (default `./excel_files`), and `export_workbook` / `import_workbook` move files between the
  135. server and the client.
  136. The server listens on localhost only. To accept other machines, set a token and a host:
  137. ```bash
  138. EXCEL_MCP_AUTH_TOKEN=change-me uvx excel-mcp-server streamable-http --host 0.0.0.0
  139. ```
  140. Clients then send `Authorization: Bearer change-me`. Put a TLS-terminating reverse proxy in
  141. front of it for use across networks.
  142. ### Docker
  143. ```bash
  144. docker build -t excel-mcp-server .
  145. docker run -p 8017:8017 -v "$PWD/workbooks:/data" -e EXCEL_MCP_AUTH_TOKEN=change-me excel-mcp-server
  146. ```
  147. ## Configuration
  148. | Flag | Environment variable | Default | Meaning |
  149. | --- | --- | --- | --- |
  150. | `--allow-dir DIR` | `EXCEL_FILES_PATH` | none (stdio), `./excel_files` (HTTP) | Folders workbooks must be in |
  151. | `--read-only` | `EXCEL_MCP_READ_ONLY=1` | off | Only offer tools that do not change files |
  152. | `--allow-vba-write` | `EXCEL_MCP_ALLOW_VBA_WRITE=1` | off | Add tools that write VBA macros (see warning below); ignored with `--read-only` |
  153. | `--tools AREAS` | `EXCEL_MCP_TOOLS` | all | Only offer the core tools and these comma-separated areas, to save context (see [Choosing tools](#choosing-tools)) |
  154. | `--max-file-mb N` | `EXCEL_MCP_MAX_FILE_MB` | `100` | Largest workbook the server opens. Also sets the unpacked-size limit (10 times this) that every opened or uploaded workbook must stay under; parts compressed over 500:1 are refused |
  155. | `--max-cells N` | `EXCEL_MCP_MAX_CELLS` | `100000` | Most cells one call may read, write or format; reads are still returned in pages; also bounds text to 256 characters per cell on average |
  156. | `--max-pivot-cells N` | `EXCEL_MCP_MAX_PIVOT_CELLS` | `3000000` | Largest PivotTable source in cells (a 230,000-row, 13-column sheet); creating one from the biggest sources takes a minute and about 2 GB of memory |
  157. | `--max-loaded-cells N` | `EXCEL_MCP_MAX_LOADED_CELLS` | `3000000` | Most cells and rows of a workbook that may be loaded into memory at once, about 0.5 KB each (a 3,000,000 limit is about 1.5 GB). A workbook with more is refused by the tools that must load whole sheets; `read_range` and the other streaming reads, and edits of large sheets that parse only some rows, are not limited by the size of the sheet. It also limits, to 128 characters per cell, the formula text that shared formulas expand to |
  158. | `--log-level LEVEL` | | `WARNING` | Logging on stderr |
  159. | `--host HOST` | `EXCEL_MCP_HOST` | `127.0.0.1` | HTTP listen address |
  160. | `--port PORT` | `EXCEL_MCP_PORT` | `8017` | HTTP port |
  161. | | `EXCEL_MCP_AUTH_TOKEN` | none | Bearer token required on HTTP requests |
  162. | `--allow-unauthenticated` | | off | Allow a non-local `--host` without a token |
  163. ## Tools
  164. | Area | Tools |
  165. | --- | --- |
  166. | Workbooks | `create_workbook`, `describe_workbook`, `set_workbook_settings`, `list_workbooks`, `export_workbook`, `import_workbook` |
  167. | CSV | `import_csv`, `export_csv` |
  168. | Sheets | `describe_sheet`, `create_sheet`, `rename_sheet`, `copy_sheet`, `delete_sheet`, `insert_rows_or_columns`, `delete_rows_or_columns` |
  169. | Cells | `read_range`, `write_range`, `clear_range`, `copy_range`, `sort_range`, `transform_range`, `find_cells`, `replace_cells` |
  170. | Formulas | `trace_formula`, `goal_seek` |
  171. | Formatting | `format_range`, `merge_cells`, `set_sheet_layout`, `add_conditional_format`, `add_data_validation` |
  172. | Objects | `set_table`, `create_chart`, `delete_chart`, `create_pivot_table`, `delete_pivot_table`, `add_slicer`, `delete_slicer`, `insert_image`, `delete_image`, `add_sparklines`, `delete_sparklines` |
  173. | Names and notes | `set_defined_name`, `delete_defined_name`, `set_note`, `delete_note` |
  174. | Macros | `read_vba`; with `--allow-vba-write`: `write_vba_module`, `delete_vba_module` |
  175. ### Choosing tools
  176. Every tool costs context in every request. `--tools` offers only the core tools
  177. (`describe_workbook`, `describe_sheet`, `read_range`) and the areas you list, for example
  178. `uvx excel-mcp-server stdio --tools data,charts`. It combines with `--read-only` (read-only tools
  179. of the areas) and `--allow-vba-write` (which also needs the `vba` area). An unknown area stops the
  180. server at startup and lists the valid ones. The sizes are characters of tool descriptions and
  181. schemas, at about 3.5 characters per token:
  182. | Area | Tools | Characters |
  183. | --- | --- | ---: |
  184. | core (always) | `describe_workbook`, `describe_sheet`, `read_range` | 8,900 |
  185. | `workbooks` | `create_workbook`, `set_workbook_settings`, `list_workbooks`, `export_workbook`, `import_workbook` | 2,600 |
  186. | `csv` | `import_csv`, `export_csv` | 2,200 |
  187. | `sheets` | `create_sheet`, `rename_sheet`, `copy_sheet`, `delete_sheet`, `insert_rows_or_columns`, `delete_rows_or_columns` | 2,000 |
  188. | `data` | `write_range`, `clear_range`, `copy_range`, `sort_range`, `transform_range`, `find_cells`, `replace_cells` | 6,700 |
  189. | `formulas` | `trace_formula`, `goal_seek` | 1,300 |
  190. | `formatting` | `format_range`, `merge_cells`, `set_sheet_layout`, `add_conditional_format`, `add_data_validation` | 14,000 |
  191. | `tables` | `set_table` | 1,900 |
  192. | `charts` | `create_chart`, `delete_chart`, `add_sparklines`, `delete_sparklines` | 9,900 |
  193. | `pivots` | `create_pivot_table`, `delete_pivot_table` | 4,600 |
  194. | `slicers` | `add_slicer`, `delete_slicer` | 2,500 |
  195. | `names` | `set_defined_name`, `delete_defined_name` | 900 |
  196. | `notes` | `set_note`, `delete_note` | 500 |
  197. | `images` | `insert_image`, `delete_image` | 800 |
  198. | `vba` | `read_vba`; with `--allow-vba-write`: `write_vba_module`, `delete_vba_module` | 1,900 |
  199. ### CSV
  200. `import_csv` reads a `.csv` or `.tsv` file into a sheet (created if missing) at a cell, and
  201. `export_csv` writes a range as CSV. Both stay in the allowed folders, within `--max-cells` and
  202. `--max-file-mb`, and never run anything.
  203. - Import detects the delimiter from the first record (or takes `comma`, `semicolon`, `tab`,
  204. `pipe`) and reads UTF-8 with or without a BOM, UTF-16 and `cp1252`. Quoted fields and line
  205. breaks inside them are kept.
  206. - Fields are typed as in Excel's import: numbers (also `1,234.50`, `12%`; `decimal` for a
  207. decimal comma), `TRUE`/`FALSE` and ISO dates (`2026-01-31`, `2026-01-31 09:30`) become values.
  208. Text Excel would alter stays text: leading zeros (`007`), more than 15 digits, a leading `+`,
  209. and numeric dates such as `01/02/2026`, which are read only in the `date_order` you name
  210. (`dmy` or `mdy`). `as_text` keeps every field as text.
  211. - Fields are never formulas. Text starting with `=`, `+`, `-` or `@` is stored as text with
  212. Excel's quote prefix, so editing the cell does not run it; a number such as `-5` is a number.
  213. - Export writes raw values (full precision, ISO dates) or, with `formatted`, what Excel shows.
  214. Text cells starting with `=`, `+`, `-` or `@` get a `'` prefix (`escape_formulas`, on by
  215. default) so a spreadsheet that opens the file does not run them; numbers are never prefixed.
  216. Datetimes are written as `2026-01-31T09:30:00`, which Excel opens as text; use `formatted`
  217. for Excel.
  218. Use `encoding: utf-8-sig` for a BOM, which Excel needs to show accents when it opens a UTF-8
  219. file by double-click. Lines end with CRLF.
  220. Every parameter is documented in [TOOLS.md](TOOLS.md). Parameters mean the same in every tool:
  221. | Parameter | Meaning |
  222. | --- | --- |
  223. | `path`, `sheet` | The workbook and the worksheet |
  224. | `range`, `at` | A block of cells (`A1:D20`), and the top-left cell of whatever is placed there: written values, copies, charts, images, PivotTables, slicers |
  225. | `source` | Where data comes from, optionally on another sheet (`Data!A1:E200`) |
  226. | `name` | The name of a table, chart, image, PivotTable, slicer or defined name |
  227. | `_cm`, `_pt`, `_chars` | Units of sizes: `width_cm`, `row_heights_pt`, `column_widths_chars` |
  228. Tools that change a workbook return what they changed (`sheet`, `range`, `name`) so that the
  229. next call can refer to it. Charts and images are selected by name, as listed by `describe_sheet`.
  230. ### Writing macros (opt-in)
  231. With `--allow-vba-write` (or `EXCEL_MCP_ALLOW_VBA_WRITE=1`) the server can set the code of
  232. standard, class, workbook and sheet modules in `.xlsm` and `.xltm` files, delete standard and
  233. class modules, and create or import `.xlsm`/`.xltm` workbooks (without the option both are
  234. refused, and `import_workbook` removes macros from uploads to `.xlsx`/`.xltx`). The server only
  235. stores the code; it never runs it, and Excel asks before enabling macros. Digitally signed VBA projects are
  236. refused, since any change would invalidate the signature.
  237. > **Warning:** macro code runs with your user's rights once you enable macros in Excel. A
  238. > model that reads untrusted content could be tricked into writing harmful code. Enable this
  239. > option only for trusted workflows, keep `--allow-dir` narrow, and **read the code before
  240. > you enable macros**. The tools are never offered in `--read-only` mode.
  241. ## Security
  242. - Formulas are parsed before they are written. Functions that reach the network or other
  243. programs (`WEBSERVICE`, `IMAGE`, `RTD`, `CALL`, Google Sheets `IMPORTXML` and others),
  244. Excel 4.0 macro functions (`FILES`, `GET.WORKBOOK`, `RUN` and others), DDE links and
  245. references to other workbooks are rejected. `HYPERLINK` is accepted with a fixed
  246. `http(s)://`, `mailto:` or `#Sheet!A1` link only.
  247. - Paths are resolved, including symlinks, before they are checked against the allowed
  248. folders. Network (UNC) and Windows device paths are always rejected.
  249. - A single call processes at most 100,000 cells (`--max-cells`) and, on average, 256 characters of text per cell (25.6 million characters at the default), and large reads are returned in pages. Text a workbook stores once but many cells hold is counted in every cell, and a workbook that saving would expand past the unpacked-size limit is refused.
  250. - Cell contents are data from files. The server tells the model not to follow instructions
  251. found in them, but review what an assistant does with workbooks from untrusted sources.
  252. Please report vulnerabilities privately; see [SECURITY.md](SECURITY.md).
  253. ## Limitations
  254. - Formulas are stored in the file, and Excel calculates them when it opens it. So that
  255. `read_range` is useful before that, `values` mode calculates formulas that have no saved
  256. result with a built-in calculator (479 functions: math, statistics and distributions,
  257. regression, database, engineering, financial and bond, dates, text, lookup, logical, LET and
  258. LAMBDA, sorting and filtering). Results Excel saved are
  259. always preferred. A formula the calculator cannot reproduce exactly as Excel does (an
  260. unsupported function, a circular reference, or an Excel quirk it does not replicate) is
  261. returned as null and listed in `uncalculated` with the reason; it is never guessed.
  262. Ranges in a formula are reduced to the formula's own row or column where Excel's ordinary
  263. (not array-entered) formulas do the same, and volatile functions such as `RAND` are not
  264. calculated. The calculator is checked against more than 2,500 formulas recorded from real
  265. Excel (`tests/fixtures/formula_golden.json`).
  266. - `trace_formula` and `goal_seek` use that calculator, so `goal_seek` refuses a formula it
  267. cannot calculate. Where Excel's Trace Precedents shows the cells an `OFFSET` starts from,
  268. `trace_formula` shows the cells `INDIRECT` and `OFFSET` point at; when those cannot be
  269. worked out the formula is listed in `unknown`. Where Excel's search stops at the
  270. "may not have found a solution" message, `goal_seek` may still find a root, and it stores
  271. the answer only when it converges (within 0.001 of the target, as Excel does).
  272. - Functions Excel added after 2007 (`IFS`, `XLOOKUP`, `STDEV.S`, `SORT`, ...) are written
  273. with the `_xlfn.` prefix Excel expects, wherever formulas are stored (cells, copied and
  274. sorted cells, conditional formats, data validation, defined names).
  275. - Legacy `.xls` files are not supported; use `import_csv` for CSV files.
  276. - PivotTables are created from a snapshot and can use text, number and date columns of up to
  277. 3,000,000 cells (`--max-pivot-cells`); Excel refreshes them from the live source data. They support number formats,
  278. "show values as" (percent of total, row, column or parent, difference from, running total,
  279. rank), sorting by label or value, date and number grouping, calculated fields, compact,
  280. outline and tabular layouts, subtotals on or off, filters with chosen items and several
  281. value fields as columns or rows. The figures written into the cells are the ones Excel shows
  282. after a refresh, checked against about 200 PivotTables recorded from real Excel
  283. (`tests/fixtures/pivot_golden.json`). The exceptions: items that tie when sorted by value may
  284. swap places on refresh, and `values_in: "rows"` cannot be combined with rank figures or, with
  285. subtotals, other figures along a field, because Excel mixes the value fields up there.
  286. - `add_slicer` adds slicers (Insert > Slicer) for tables and PivotTables, and timelines for date
  287. fields of PivotTables: field, caption, position and size, columns, style, sort, selected
  288. items (or a period) and "hide items with no data". Selecting items filters as clicking
  289. does: table rows are filtered and hidden; PivotTable items are hidden and the figures
  290. recalculated from the source, which Excel confirms on refresh (about 200 PivotTables are
  291. checked against Excel, and the slicer variants against Excel's own results). One slicer can
  292. filter several PivotTables that share a cache, such as those of copied sheets. Limits: a
  293. PivotTable made or refreshed by Excel keeps its figures in the cells (the hidden items and
  294. a refresh-on-open mark are stored, so Excel recalculates when it opens the file); fields
  295. grouped in a PivotTable take no slicer.
  296. - Inserting or deleting rows and columns, and renaming a sheet, update references like
  297. Excel. Hyperlink targets and 3D references (`Sheet1:Sheet3!A1`) are left alone (Excel does
  298. the same). An edit that cuts through an array formula, a PivotTable, a table header or two
  299. tables at once is refused. Inserted cells take the formatting, row height and column width
  300. of the line above or to the left (nothing at the first row or column), and calculated table
  301. columns are filled into rows inserted in a table.
  302. - Editing a workbook keeps what the tools cannot change: sparklines, extended conditional
  303. formats and validation, slicers and timelines, newer charts (waterfall, histogram,
  304. treemap and others), threaded comments, shapes, form controls, linked data types and
  305. custom XML stay as Excel saved them and move with inserted or deleted rows and columns and
  306. renamed sheets. `copy_sheet` copies sparklines, slicers and timelines (as Excel does), the Excel
  307. 2010 half of conditional formats (data bars, icon sets) and the Excel 2016 charts made by
  308. `create_chart`, but not the others. Deleting a sheet removes slicers that only it used;
  309. slicers that would be left without their PivotTable block the deletion, and deleting a
  310. table, or the column a table slicer filters, removes the slicer.
  311. Digital signatures are removed, as Excel does when a signed file changes.
  312. - Formulas that return several values (`FILTER`, `SORT`, `UNIQUE`, `SEQUENCE`, `A2:A9*2`) are
  313. stored as dynamic array formulas, as Excel stores them, and spill into the cells next to
  314. them. A cell in the way blocks the spill (Excel shows `#SPILL!`), and `write_range`
  315. reports it. Where the calculator cannot tell how large a result is, only the formula's
  316. cell is stored and Excel fills in the rest when it opens the file.
  317. ## Upgrading from 1.x
  318. Version 2.0 makes tool and parameter names consistent across tools, which breaks 1.x clients
  319. and saved prompts. The changelog has a table that maps every 1.x name to its 2.0 replacement:
  320. [Upgrading from 1.x](CHANGELOG.md#upgrading-from-1x). Coming from 0.x? See the
  321. [1.0.0 notes](CHANGELOG.md#100---2026-09-28) first.
  322. ## Contributing
  323. Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
  324. ## License
  325. MIT. See [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.