Macro workbooks open and save inside Seafile — after one line in Seafile itself.
Seafile speaks WOPI — the same protocol it uses for Office Online Server. SumOffice answers that protocol, so for .xlsx and .docx the editor is a setting on the Seafile side and nothing more. Macro workbooks are different: Seafile does not classify .xlsm as a spreadsheet, so one line of its own code has to change first. We found that line, measured what it unlocks, and sent Seafile the patch. Below is the whole setup, that line included.
What was measured
| Stand | Seafile 12.0.14 (Community Edition), MariaDB, memcached; SumSheet and SumDoc behind one address. The WOPI app ships inside the open-source seahub, so Community is enough and the same setting path applies to Professional. The macro-workbook numbers below were taken with the one-line change of Step 3 applied; everything else needs no code change. |
|---|---|
| Opening | A macro workbook (110 KB, 65 parts, 83 formulas, a VBA project) opened from a Seafile library into SumSheet in 7.9 s on a laptop; a .docx into SumDoc in 1.9 s. |
| Saving back | Write-back through WOPI PutFile created a new revision in Seafile, and Seafile returned exactly the bytes the engine wrote — same SHA-256. |
| What came back | The workbook: 65 parts of 65, vbaProject.bin byte for byte, 83 formulas of 83, 9 defined names of 9. The document: 16 parts of 16, all five pictures identical. We said here before that Microsoft Excel opened the returned file without a repair dialog; the tool that checked that could not be found again, so the line is withdrawn until the check is re-run. |
| Not counted | People, libraries, documents. Evaluation is free with no time limit; production is the per-application license. |
Step 1 — start the editors
Same compose as for any WOPI host: two editors behind one address, a small service that merges their discovery into one document.
mkdir sumoffice-seafile && cd sumoffice-seafile
git clone https://github.com/SumOfficeApp/sumoffice-docker && cd sumoffice-docker/nextcloud # the same compose serves Seafile
cp env.example .env # PUBLIC_URL=https://office.example.com — the address your people reach the editor at
docker compose up -d
curl -s $PUBLIC_URL/hosting/discovery | head -c 300 # the WOPI discovery Seafile will read
Step 2 — point Seafile at them
In seahub_settings.py:
ENABLE_OFFICE_WEB_APP = True
OFFICE_WEB_APP_BASE_URL = 'https://office.example.com/hosting/discovery'
OFFICE_WEB_APP_FILE_EXTENSION = ('xls', 'xlsx', 'xlsm', 'xlsb', 'ods', 'doc', 'docx', 'docm')
ENABLE_OFFICE_WEB_APP_EDIT = True
OFFICE_WEB_APP_EDIT_FILE_EXTENSION = ('xlsx', 'xlsm', 'xlsb', 'docx')
The last line is what makes the editor open a file for editing rather than viewing, so list every extension your people edit.
Step 3 — for macro workbooks, one line in Seafile
Skip this step if you only open .xlsx and .docx — they work with the settings above and nothing else.
Seafile decides a file's type before any of the OFFICE_WEB_APP_* settings are consulted, and .xlsm is not on its list of spreadsheets. In seahub/utils/__init__.py, line 137:
- SPREADSHEET: ('xls', 'xlsx', 'ods', 'fods'),
+ SPREADSHEET: ('xls', 'xlsx', 'xlsm', 'xlsb', 'ods', 'fods'),
Without it a macro workbook is typed Unknown, the file page answers “Online view is not applicable to this file format”, and the editor is never offered — measured on a stock instance on 28 September 2026. This is a change to Seafile, not to SumOffice: we reported it to the Seafile team with the line and the patch, and it is theirs to ship. Until they do, the line lives in your container layer and has to be re-applied when the container is recreated.
Step 4 — open a workbook
- Click any
.xlsxor.docxin a library — or a.xlsm, if you made the change in Step 3. The editor opens in the Seafile window; the first document takes a few seconds while its process starts. - Edit and save: the file goes back through WOPI and Seafile keeps the previous revision in the file history.
- Download it and open it in Excel: the VBA project and the formulas are the ones you put there.
Two deployment notes. The editor runs in a frame on a different host than Seafile, so put both behind HTTPS — on plain http a browser drops the editor's session cookie unless both sides share one site. And Seafile caches the discovery document: after you change the editor address, restart memcached.
Scope today
- .xlsx / .xlsm / .xlsb and .docx are edited and saved back natively; .ods / .odt open by import and save as .xlsx / .docx.
- Macros and Power Query travel with the file untouched; supported VBA runs in SumSheet without Excel, and what is not supported is named before the file changes rather than dropped.
- Presentations: not in this server yet. SumSlide, the presentations editor, ships as desktop apps for macOS, Windows and Linux.
- Macro workbooks (
.xlsm,.xlsb) need the one-line change in Seafile of Step 3 — a setting alone will not do it. We reported it to the Seafile team with the line and a patch; ask us and we will send the current state of that conversation.
Before you move a department, run its workbooks through Check my Excel file: it names every macro, every function and every data source the engine knows or does not know, in seconds, without running anything.
- Order a change under your process — your SSO, your storage rules: from 150 €, price and date before we start.
- Tell us what kind of organization embeds it — the production license is per embedding application, no meters on your users.