merton.excel.installer¶
Sideload-directory installer for the Office.js manifest.
Excel reads Office.js add-in manifests from a platform-specific sideload directory:
macOS:
~/Library/Containers/com.Microsoft.Excel/Data/Documents/wefWindows:
%LOCALAPPDATA%\Microsoft\Office\16.0\WefLinux: not supported (Excel itself is unavailable; users on Linux need Excel for the web and a manual upload).
This module writes the manifest XML to the right place; users can also just install via Excel’s Upload My Add-in UI by pointing at any local path.
Attributes¶
Functions¶
|
Best-effort detection of Excel's sideload directory for this OS. |
|
Write the manifest into the sideload directory. Returns its path. |
|
Remove the manifest. Returns |
|
Whether the manifest is currently in the sideload directory. |
Module Contents¶
- merton.excel.installer.sideload_directory() pathlib.Path[source]¶
Best-effort detection of Excel’s sideload directory for this OS.
- merton.excel.installer.install(*, base_url: str = 'http://localhost:8000', sideload_dir: pathlib.Path | None = None) pathlib.Path[source]¶
Write the manifest into the sideload directory. Returns its path.
- merton.excel.installer.uninstall(*, sideload_dir: pathlib.Path | None = None) bool[source]¶
Remove the manifest. Returns
Trueif a file was actually deleted.
- merton.excel.installer.is_installed(*, sideload_dir: pathlib.Path | None = None) bool[source]¶
Whether the manifest is currently in the sideload directory.