Excel — installation and sideloading¶
The merton Excel add-in is two pieces:
A small FastAPI server that runs locally and exposes the
=MERTON.*formulas.An Office.js manifest XML that tells Excel where to find the server.
Install the extra¶
uv pip install "merton[excel]"
This pulls in xlwings, fastapi, uvicorn, openpyxl, xlsxwriter,
jinja2, and httpx.
Sideload the add-in¶
merton excel install --url http://localhost:8000
This writes merton-manifest.xml into your Excel sideload directory:
macOS —
~/Library/Containers/com.Microsoft.Excel/Data/Documents/wef/Windows —
%LOCALAPPDATA%\Microsoft\Office\16.0\Wef\Linux / others —
~/.config/merton/excel/(manual upload via Excel on the web)
To verify:
merton excel status
Start the server¶
merton excel server start --port 8000
Leave the terminal running while you use Excel. To run it detached:
merton excel server start --background
merton excel server stop
Activate the add-in in Excel¶
Open Excel (desktop or web).
Insert → My Add-ins → Shared Folder (or Upload My Add-in on the web).
Pick merton.
Try
=MERTON.DD(100, 0.30, 35, 0.04, 1).
Excel will fetch the function metadata, register the namespace, and
autocomplete every MERTON.* formula.
Uninstall¶
merton excel server stop
merton excel uninstall
Classic UDF fallback (Windows desktop only)¶
If you can’t run a local server (e.g. inside a locked-down workstation),
the same formulas register as classic xlwings UDFs via
merton.excel.udf. Configure xlwings to point at that module, then
the formulas are available without the FastAPI server. See
Building a live Excel credit dashboard for the full setup.