merton.excel.manifest¶
Office.js add-in manifest XML generation.
Office.js (Excel for the web / Mac / Windows M365) sideloads add-ins via an
XML manifest that describes the add-in’s identity, permissions, and the
URLs to the JavaScript / functions / settings files. We generate this
manifest at install time so it points at the user’s locally-running
merton excel server.
The manifest schema is documented at https://learn.microsoft.com/en-us/javascript/api/manifest .
Functions¶
|
Generate a stable UUID derived from |
|
Render the Office.js add-in manifest XML. |
|
Write the manifest to disk and return the resulting |
Module Contents¶
- merton.excel.manifest.deterministic_add_in_id(base_url: str) str[source]¶
Generate a stable UUID derived from
base_urlso re-installing the add-in for the same server URL keeps the same identity.
- merton.excel.manifest.render_manifest(*, base_url: str = 'http://localhost:8000', version: str = '1.0.0.0', add_in_id: str | None = None) str[source]¶
Render the Office.js add-in manifest XML.
- Parameters:
base_url – Where the merton excel server is reachable (default
http://localhost:8000).version – Four-part add-in version (Microsoft requires this exact format).
add_in_id – Optional override. Defaults to a deterministic UUID derived from
base_urlso the same server URL always produces the same manifest identity.
- merton.excel.manifest.write_manifest(path: str | pathlib.Path, *, base_url: str = 'http://localhost:8000', version: str = '1.0.0.0') pathlib.Path[source]¶
Write the manifest to disk and return the resulting
Path.