merton.cli.commands.excel

merton excel — install/uninstall the Office.js add-in and run the local FastAPI server that powers it.

merton excel install                  # write manifest to Excel sideload dir
merton excel server start --port 8000 # foreground; ^C to stop
merton excel server status            # check the PID file
merton excel server stop              # graceful shutdown
merton excel uninstall                # remove the manifest
merton excel sample-workbook --out=sample.xlsx   # generate worked examples

Attributes

Functions

install() → None)

Write the Office.js manifest into Excel's sideload directory.

uninstall(→ None)

Remove the merton manifest from Excel's sideload directory.

status(→ None)

Print whether the manifest and server are currently active.

server_start(, port, reload, background)

Start the FastAPI server.

server_stop(→ None)

Stop a background server started via server start --background.

server_status(→ None)

Show the running server's PID, if any.

sample_workbook(, , [, help])

Write a worked-example workbook to out.

Module Contents

merton.cli.commands.excel.app[source]
merton.cli.commands.excel.server_app[source]
merton.cli.commands.excel.console[source]
merton.cli.commands.excel.install(base_url: str = typer.Option('http://localhost:8000', '--url', '-u', help='Where the FastAPI server will be reachable.')) None[source]

Write the Office.js manifest into Excel’s sideload directory.

merton.cli.commands.excel.uninstall() None[source]

Remove the merton manifest from Excel’s sideload directory.

merton.cli.commands.excel.status() None[source]

Print whether the manifest and server are currently active.

merton.cli.commands.excel.server_start(host: str = typer.Option('127.0.0.1', '--host', help='Host interface.'), port: int = typer.Option(8000, '--port', '-p', help='TCP port.'), reload: bool = typer.Option(False, '--reload', help='Restart on code changes.'), background: bool = typer.Option(False, '--background', '-b', help='Run detached.')) None[source]

Start the FastAPI server.

merton.cli.commands.excel.server_stop() None[source]

Stop a background server started via server start --background.

merton.cli.commands.excel.server_status() None[source]

Show the running server’s PID, if any.

merton.cli.commands.excel.sample_workbook(out: pathlib.Path = typer.Option(Path('merton-sample.xlsx'), '--out', '-o', help='Destination .xlsx path.')) None[source]

Write a worked-example workbook to out.