npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

excel-partner

v0.1.22

Published

Excel Partner: local Excel desktop AI add-in with Claude Code, GitHub Copilot CLI, Codex CLI and OpenCode CLI providers.

Readme

Excel Partner

Chat with an AI coding assistant, Claude Code, GitHub Copilot CLI, Codex CLI or OpenCode, to read, analyse and edit the workbook you have open in Excel desktop on Windows.

Example: select a range and type "Add a Total column in D. Calculate B times C for each row and bold the header."

How it works

Excel task pane  <-->  local bridge (localhost:8765)  <-->  your provider CLI (Claude / Copilot / Codex / OpenCode)
  • The task pane is the chat UI inside Excel. Workbook changes run through Office.js in your open workbook.
  • The bridge runs on your PC. It uses the provider CLI you already installed and signed in to. Excel Partner never asks for or stores an API key.
  • Billing, usage limits and data policy belong to the provider you choose.

Requirements

  • Windows with Excel desktop (ExcelApi 1.9+; some features need a newer Excel)
  • Node.js 20+ and npm, installed on Windows
  • At least one provider CLI, installed and signed in on Windows (not only inside WSL)

Quick start

Run in Windows PowerShell.

1. Install a provider (pick at least one):

| Provider | Install | Sign in | | --- | --- | --- | | Claude Code | npm install -g @anthropic-ai/claude-code | claude | | GitHub Copilot | npm install -g @github/copilot | copilot login | | Codex | npm install -g @openai/codex | codex login | | OpenCode | npm install -g opencode-ai | opencode auth login |

2. Install Excel Partner (save your work and close Excel first):

npm install -g excel-partner
excel-partner setup
excel-partner status

setup trusts a localhost certificate for your user, registers the add-in, starts the bridge and adds it to Windows start-up. A healthy bridge prints Bridge running at https://localhost:8765.

3. Use it: reopen Excel, open a workbook, choose Home > Excel Partner, pick a provider, select cells, type a request, press Enter. (Ctrl+Enter adds a new line.)

What it can do

  • Read: selections, ranges, formulas, formatting, tables, charts, pivots, shapes, and a rendered image of a range.
  • Write: values and formulas (with a check for #REF!/#NAME? errors), formatting, sort, filter, merge, validation, conditional formatting, named ranges, print layout, sheets.
  • Build: tables, charts, pivot tables, flowcharts with attached connectors.
  • Audit: find_errors scans for formula errors; writes refuse to overwrite existing data unless overwrite is approved.
  • Look across open files: the button at the top left lists every workbook open with Excel Partner. The assistant can read another one when you ask, for example to compare or look something up, or ask that file's assistant to make a change there. See Connected files below.
  • Extend: your own reusable skills (/skill-name), references (any file or folder) and templates, file attachments (@), optional web search and browser automation.
  • Work your way: choose provider, model and effort per chat; queue a message while the assistant works; review changes and reopen past chats from History.

Type / in the chat to browse commands and skills of the selected provider.

In a browser tab

Open https://localhost:8765/ (or /index.html) in a browser for the same pane without Excel. It is the page Excel loads, served by the same bridge with your real providers, so chat, settings, sign-in, history and the assistant's reasoning all work. Reading or changing cells does not: there is no workbook, and the assistant is told so. A browser tab is not listed as a connected file, so other workbooks cannot send it requests. Like the add-in, it only answers pages from this computer.

Connected files

Open two workbooks and open Home > Excel Partner in each. The button at the top left of the task pane (green dot = connected) lists both files, with the current one marked This file.

Ask for it in plain words, for example "Compare the totals in this sheet with the Actuals file" or "In the Actuals file, fill column D with the totals". The assistant has two ways to reach the other file:

  • Look something up (list_connected_files, read_connected_file): runs one read tool in the other workbook (get_sheets, read_range, get_cell_ranges, search_data, find_errors, check_formula_consistency, get_objects). It never writes. In Ask mode you are asked once per message and per file.
  • Have something done (send_to_connected_file): the assistant of this file sends a message to the assistant of the other file. That one runs it as a normal turn in its own chat (its own model, tools and Ask/Auto setting), and its final reply comes back to the asker. In Ask mode you see the exact message and are asked every time; Auto mode sends without asking.

What to expect when something is done in the other file:

  • The request appears in the other file's chat as a message From , and its changes are listed in that file's Changes like any other edit. There is no undo, so save that file first.
  • That file's own Ask/Auto setting applies. In Ask mode its change prompts appear in that window, so switch to it to approve them; the asker waits up to 10 minutes.
  • If the other file fails or you stop it there, the asker is told it failed (with the reason), not that it finished. If the asker is stopped first, the request is not run.
  • A file that is busy with its own request is refused at once; try again when it has finished. A file needs a provider selected in its own pane.

Cell links go exactly where they say, and nothing is guessed from the words around them. The assistant points at cells with a markdown link that spells out the target: [A1:E8](cell:?file=Book2.xlsx&sheet=Sheet1&range=A1:E8) (file and sheet are optional; a space in a name is %20). Click it and that file's pane selects the range and its window comes to the front. The assistant does not have to work the target out: what it reads from or changes in another file comes back with ready-made links (link, changed[].link, taken from what the tools actually did) that it pastes into its reply. The same goes for this file: the result of a tool that works on a range (read_range, write_range, get_selection, …) carries a ready-made link for it. A cell written in plain words ("F10:F16", "Data!B2") still links to a sheet of the file you are in, but not in a reply that used the other-file tools, names another open file, or names one of this workbook's sheets ("sheet2/C5"): there it stays plain text, because a link to the wrong sheet or file is worse than no link. If a file is not open, or has no such sheet, you get a message saying so.

  • A file's name is read from Excel when someone needs it: when you open the list, or when the assistant lists or uses the files. After a Save As, the new name shows up the next time you open the list.
  • Its task pane must be open: a workbook without the pane is not listed. A file that was closed and reopened gets a new id, so the assistant lists again.
  • What is read or sent goes to the AI provider of the chat that handles it. Replies and cell contents from the other file are data, not instructions.

Testing from your own test-case file

Open any test-case workbook (your company's format, any folder) and let the assistant test it. Nothing is set up per project.

One-time, per system you test. In Excel: Settings → Testing: sign-ins, notes, scripts → enter a name and the address → Open browser to sign in → sign in → I'm signed in. The same panel lists, shows and deletes saved sign-ins, notes and scripts, and opens their folders. Or in a terminal:

excel-partner login admin https://staging.example.com   # Chrome opens; you sign in; press Enter in the terminal
excel-partner sessions                                   # list saved sign-ins (names, sites, date)
excel-partner logout admin                               # delete one

The password is typed into the site itself. Only the browser's session (cookies) is saved, in %LOCALAPPDATA%\Excel Partner\sessions, and the assistant never sees it. If the sign-in page is on another host (single sign-on), the hosts visited during login are saved with it; add more with --origin https://sso.example.com. A saved sign-in expires like any login: run the command again.

Every time (in Excel):

  1. Turn on Playwright in Tools beside the prompt, then type /qa with what you want, for example /qa test sheet "Test Cases" on https://staging.example.com. Type /qa login to be shown the exact command for your system.
  2. The assistant reads the sheet and tells you how it understood the layout (ID, steps, expected result, where results go). Correct it if it is wrong.
  3. It opens the browser with your saved sign-in (open_test_browser). You are asked every time, even in Auto mode, and the dialog shows which sign-in and which sites. The browser can reach only those sites; everything else, IP addresses included, is blocked.
  4. You watch every step in the live view above the message box. For each test case the assistant follows the steps, compares with the expected result and writes the outcome into the sheet (record_test_results): status, actual result, date and so on, in your own columns. Columns that do not exist yet, such as a progress column, are added after the last header with the same look.
  5. Two things come out of every case. The status in your sheet, and a Playwright script for that case. A script is saved only when the case passed, or failed and the assistant is sure the application is wrong (save_test_script). A case blocked by a technical problem, or one the assistant did not understand, is marked for review and gets no script.
  6. Before it may say the run is done, the assistant must call finish_test_run. The bridge reads each row back from the sheet and refuses (with a list of what is missing) if a result is not there, a script is missing, or a script exists for a case that should not have one. At the end you get a summary: passed, failed, needs review, blocked.

What the assistant remembers. Everything it learns about a system (how to log in, where screens are, how to do a task, quirks, test data that is safe to keep) is saved as short Markdown notes in %LOCALAPPDATA%\\Excel Partner\\knowledge\\<host>\\, next to sessions. When the browser opens, the assistant is handed the list of notes for those sites (one line each, with the date) and opens only the ones it needs, so a new chat or a new day does not start from zero. In Ask mode you see each note before it is saved; notes that look like they contain a password, token or cookie are refused. A system keeps at most 30 notes (64,000 characters). Notes are treated as hints from earlier sessions, not as orders, and the assistant checks them against the page.

excel-partner knowledge                      # which systems have notes (and where the folder is)
excel-partner knowledge https://staging.example.com           # list that system's notes
excel-partner knowledge show https://staging.example.com login # read one
excel-partner knowledge delete https://staging.example.com login

You can also edit the .md files by hand; the list is read from each file's header (kind, summary, updated).

Regression scripts. Each kept case becomes a file %LOCALAPPDATA%\\Excel Partner\\scripts\\<host>\\<case id>.spec.js (a Playwright Test file with a header: case, outcome, date, sheet row, the evidence). It asserts the expected result, so a script saved for an application defect fails until the defect is fixed. Scripts may import only @playwright/test, use relative paths and read only BASE_URL and STORAGE_STATE; ones with require, fetch, other sites or anything that looks like a password are refused. This is a check, not a sandbox: read a script before you run it. To run one (the add-in itself does not run them): npm i -D @playwright/test, then BASE_URL=https://staging.example.com STORAGE_STATE=<saved session file> npx playwright test <file>. open_test_browser also lists the scripts that already exist for the sites, so the assistant knows which cases were done before.

excel-partner scripts                                   # which systems have scripts (and where the folder is)
excel-partner scripts https://staging.example.com        # list that system's scripts
excel-partner scripts show https://staging.example.com TC-001
excel-partner scripts delete https://staging.example.com TC-001

Without a saved sign-in the assistant can still open a browser window and wait while you sign in by hand, but that sign-in is lost when the browser closes.

Cells that already hold something are not overwritten unless you agree; cells the assistant wrote earlier in the session (for example "Đang test" before "Pass") are updated freely. Results are written as text, never as formulas. A step that is unclear, or a page that behaves differently from the sheet, is marked for review instead of being guessed. If the same browser action fails twice, the assistant stops repeating it and reports.

Safety and permissions

  • Ask / Auto (next to the prompt): Ask approves each change, Auto approves automatically, including overwriting non-empty cells. In Ask mode, overwriting existing data needs your OK.
  • Undo. Excel's own Ctrl+Z cannot undo what the assistant does (Office.js writes do not go on Excel's undo stack), so Excel Partner keeps its own record. Open Changes: each edit has an Undo button, and Undo last reply puts back everything the assistant changed in its latest reply, newest first.
    • Put back: values, formulas, number formats, fills, fonts, borders, alignment, merged cells, column widths and row heights of the cells an edit touched (write_range, set_formula, set_cells, clear_range, format_range, find_replace, copy_to, sort_range, merge_range, resize_range) and rows added by insert_rows.
    • Cells you changed after the assistant's edit are never overwritten: they keep your version and the undo message lists them. Undoing twice does nothing the second time.
    • Not put back: cell notes, hyperlinks, formatting of single characters inside a cell, data validation and conditional formats on cleared or copied cells, charts, pivot tables, tables, shapes, sheet operations, named ranges, filters, print layout, row/column structure changes and anything done through execute_office_js. These show Can't undo in Changes.
    • Before the first of those in a reply, a copy of the whole workbook is saved to %LOCALAPPDATA%\Excel Partner\backups\ (newest 10 kept; excel-partner backups lists them). Restoring is "open the copy". If no copy could be saved, the change list says so.
    • An edit over 50,000 cells (20,000 when formatting is involved) is not recorded. The undo history lives in memory only: reloading the task pane clears it, and old entries expire after about 500,000 recorded cells.
    • Excel tables that grew because the assistant wrote just below them are shrunk back.
    • With several workbooks open, Excel can refuse the undo ("the workbook has lost focus"): bring that workbook to the front and press Undo again; nothing was changed.
  • Other changes stay one-way. Save important work first and review what was changed.
  • Python and skill scripts (run_python, run_skill_script) run with your Windows user permissions and can reach local files and the network. Keep them on Ask unless you trust the task.
  • execute_office_js (free-form Office.js) is on by default. Disable it with BRIDGE_ALLOW_OFFICE_JS=0 or "allowOfficeJs": false in config.json, then restart the bridge.
  • Selected cells and workbook context are sent to your chosen provider as part of each request. Their data policy applies.

Instructions

Settings > Instructions adds your own rules for every chat (for example "answer in Vietnamese"). It is empty by default, so each provider keeps its native behaviour. Use recommended loads a ready-made set of Excel working rules (read before writing, use formulas, never overwrite silently, verify after editing). Press Save, then start a new chat so the old history does not keep earlier instructions. Note: with Claude, a non-empty instruction replaces its built-in prompt rather than adding to it.

Commands

| Command | What it does | | --- | --- | | excel-partner setup [addin\|gateway\|all] | Register and start (default: add-in) | | excel-partner start / stop / restart | Control the bridge | | excel-partner status | Show what is running | | excel-partner doctor | Check the installation and say what to fix | | excel-partner logs | Show recent log lines | | excel-partner login <name> <url> / sessions / logout <name> | Save, list and delete signed-in sessions for the test assistant (see Testing above) | | excel-partner knowledge [<url>] / show / delete | See and manage what the assistant has learned about each system | | excel-partner backups | List the workbook copies saved before changes Undo cannot reverse (and where the folder is) | | excel-partner update [--from <spec\|.tgz>] | Install the latest release (or the given package); same as Settings > Updates | | excel-partner uninstall | Stop, unregister and remove start-up and certificate trust | | excel-partner help | Full CLI usage |

Update: open Settings > Updates in the task pane. It shows the installed version, Check for updates asks the npm registry, and when a newer release exists Update now (click twice to confirm) installs it. Excel does not need to be closed: the add-in is served by the local bridge, so the connection drops for about a minute while the bridge and gateway restart, then the pane reloads by itself and says which version it is now on. It refuses to start while the assistant is working, and only works for the copy installed with npm install -g (a source checkout says so; use scripts/update.ps1 there). If something goes wrong the old version is started again and Settings shows the error; the log is %LOCALAPPDATA%\Excel Partner\update.log.

From a terminal: excel-partner update does the same (--from <npm spec or .tgz> installs that instead of the latest release). Reopen the pane and start a new chat afterwards. Configuration, skills and templates are kept.

Uninstall: excel-partner uninstall, then npm uninstall -g excel-partner, then restart Excel. Local data stays on disk (see below).

Optional: Agent Gateway

The same package includes a local Anthropic Messages-compatible API backed by the provider CLIs you have installed (for example to sign in to Claude for Excel with a gateway). It does not need the add-in.

excel-partner setup gateway     # prints the URL (https://localhost:8766) and a token
excel-partner info --copy       # show them again
excel-partner gateway models    # list advertised model IDs

Model IDs look like claude/default, codex/default or provider/native-model. Run excel-partner doctor gateway if something fails. agent-gateway is an alias for these commands.

Data and configuration

| Location | Contents | | --- | --- | | %LOCALAPPDATA%\Excel Partner | Config (config.json), certificate, manifest, logs, usage.jsonl | | %USERPROFILE%\.excel-partner\skills | Your skills | | %USERPROFILE%\.excel-partner\templates | Templates used by skills | | %LOCALAPPDATA%\Agent Gateway | Gateway config, certificate and token |

Optional config.json settings (restart the bridge after editing):

{
  "referenceDirs": ["C:\\Templates"],
  "skillDirs": ["C:\\MySkills"]
}

Useful environment variables: BRIDGE_ALLOW_OFFICE_JS, BRIDGE_PYTHON_BIN, BRIDGE_BASH_BIN, BRIDGE_PLAYWRIGHT_EXECUTABLE, BRIDGE_USAGE_FILE.

The bridge listens only on localhost:8765 over HTTPS. Chat history is stored in the task pane; the usage ledger (IDs, provider, model, duration, token counts) is local and contains no workbook content. Click the info icon beside Ask/Auto to see session tokens and export usage as CSV.

Troubleshooting

Start with excel-partner doctor. Then:

| Problem | Fix | | --- | --- | | PowerShell says script execution is disabled | Use the shims: npm.cmd install -g excel-partner, excel-partner.cmd setup | | excel-partner is not recognized | Reopen PowerShell. Check npm.cmd prefix -g is on PATH. Install from Windows PowerShell, not WSL | | No Excel Partner button | Run excel-partner setup, then fully close all Excel windows and reopen. Still missing? npx.cmd --yes --package office-addin-dev-settings office-addin-dev-settings sideload "$env:LOCALAPPDATA\Excel Partner\manifest.xml" desktop --app Excel. Company policy may block developer add-ins | | Task pane stuck on Connecting | excel-partner stop, excel-partner start, open https://localhost:8765/health, read %LOCALAPPDATA%\Excel Partner\bridge.err.log. If port 8765 is busy, stop the other instance | | Certificate error | Run excel-partner setup again and restart Excel. If it says the certificate expired: excel-partner uninstall, then excel-partner setup | | Provider shows Not installed / Login required | Check claude --version, copilot --version, codex --version, opencode --version in PowerShell, install or sign in again, restart the bridge and reselect the provider | | would_overwrite | Target cells already hold data. Tell the assistant which cells it may replace | | disconnected, timeout, size_limit_exceeded | Keep the pane open, close Excel dialogs, select a smaller range, and check whether part of the change was already applied. Writes are never replayed automatically | | Old behaviour after updating | Reopen the task pane and start a new chat | | File cannot be opened | Attach it with Choose local files, or add its folder to referenceDirs |

License

MIT