Bug: range get-formulas / set-formulas always fail with COMException 0x800A03EC (de-DE locale, Excel 2019 32-bit)
Summary
Reading or writing cell formulas via the range tool always fails with COMException: 0x800A03EC, while reading/writing values, formatting, worksheet ops and VBA all work normally. The failure occurs on every cell — including empty cells and trivial, locale-independent formulas — so it is not a formula-content or locale-separator problem. This makes it impossible to build or inspect a formula-driven workbook via the MCP server.
Environment
- Excel MCP server (extension "Excel (Windows)"): v1.10.3 (also reproduced on v1.9.5); installed as unsigned local
.mcpb desktop extension
- Microsoft Excel: Office Professional Plus 2019 Retail (
ProPlus2019Retail), version 16.0.19127.20302, 32-bit, Click-to-Run
- OS: Windows 10 Pro 64-bit,
10.0.19045.7548 (22H2)
- Locale: German (
de-DE) — list separator ;, decimal separator ,
- Client: Claude Desktop (Windows) + Claude Code; assistant model Claude Opus 4.8
- .NET CLR reported by host: 4.0.30319
Steps to reproduce (minimal)
file → create a new test.xlsx (default sheet).
range set-values A1:A2 = [["10"],["20"]] → success.
range set-formulas A3 = [["=A1+A2"]] → FAILS.
range get-formulas A1:A2 → FAILS.
Expected
- Step 3 sets
A3 to =A1+A2 (evaluating to 30).
- Step 4 returns the formula strings for the range.
Actual
Both formula operations throw:
{
"success": false,
"error": "COMException: 0x800A03EC",
"errorMessage": "COMException: 0x800A03EC",
"errorCategory": "ComInterop",
"command": "range.set-formulas",
"exceptionType": "COMException",
"hresult": "0x800A03EC",
"isError": true
}
(Identical error with "command": "range.get-formulas".)
Key diagnostics (rule out the usual causes)
- Not formula content / not locale separators:
get-formulas fails even on an empty cell and on plain-text cells; set-formulas fails even for =A1+A2, which contains no list/decimal separators at all — so it is not the classic de-DE ; vs , formula-string issue.
- Excel COM itself is fine: in the same Excel process/session, VBA
Range.Formula and Range.FormulaLocal both read and write the identical formula without error (verified via the vba tool in an .xlsm). So the Excel formula engine and COM are healthy.
- Only the formula path is affected:
range set-values / get-values, range_format, worksheet, and vba tools all work correctly against the same file.
Hypothesis
The value path and the formula path use different COM members. The formula path (Range.Formula / Formula2 get & set) appears to be invoked in a way that this build/locale rejects with the generic 0x800A03EC ("object-defined error"), whereas the value path succeeds. Possibly related to how the property is marshaled under a non-en-US locale with 32-bit Excel 2019. A working reference is VBA, which uses .Formula (US syntax) / .FormulaLocal (localized) successfully on the same machine.
Bug:
range get-formulas/set-formulasalways fail with COMException 0x800A03EC (de-DE locale, Excel 2019 32-bit)Summary
Reading or writing cell formulas via the
rangetool always fails withCOMException: 0x800A03EC, while reading/writing values, formatting, worksheet ops and VBA all work normally. The failure occurs on every cell — including empty cells and trivial, locale-independent formulas — so it is not a formula-content or locale-separator problem. This makes it impossible to build or inspect a formula-driven workbook via the MCP server.Environment
.mcpbdesktop extensionProPlus2019Retail), version16.0.19127.20302, 32-bit, Click-to-Run10.0.19045.7548(22H2)de-DE) — list separator;, decimal separator,Steps to reproduce (minimal)
file→createa newtest.xlsx(default sheet).range set-valuesA1:A2=[["10"],["20"]]→ success.range set-formulasA3=[["=A1+A2"]]→ FAILS.range get-formulasA1:A2→ FAILS.Expected
A3to=A1+A2(evaluating to 30).Actual
Both formula operations throw:
{ "success": false, "error": "COMException: 0x800A03EC", "errorMessage": "COMException: 0x800A03EC", "errorCategory": "ComInterop", "command": "range.set-formulas", "exceptionType": "COMException", "hresult": "0x800A03EC", "isError": true }(Identical error with
"command": "range.get-formulas".)Key diagnostics (rule out the usual causes)
get-formulasfails even on an empty cell and on plain-text cells;set-formulasfails even for=A1+A2, which contains no list/decimal separators at all — so it is not the classic de-DE;vs,formula-string issue.Range.FormulaandRange.FormulaLocalboth read and write the identical formula without error (verified via thevbatool in an.xlsm). So the Excel formula engine and COM are healthy.range set-values/get-values,range_format,worksheet, andvbatools all work correctly against the same file.Hypothesis
The value path and the formula path use different COM members. The formula path (
Range.Formula/Formula2get & set) appears to be invoked in a way that this build/locale rejects with the generic0x800A03EC("object-defined error"), whereas the value path succeeds. Possibly related to how the property is marshaled under a non-en-USlocale with 32-bit Excel 2019. A working reference is VBA, which uses.Formula(US syntax) /.FormulaLocal(localized) successfully on the same machine.