Skip to content

[MCP] ## Bug: range get-formulas / set-formulas always fail with COMException 0x800A03EC (de-DE locale, Excel 2019 32-bit) #750

Description

@nils256

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)

  1. filecreate a new test.xlsx (default sheet).
  2. range set-values A1:A2 = [["10"],["20"]]success.
  3. range set-formulas A3 = [["=A1+A2"]]FAILS.
  4. range get-formulas A1:A2FAILS.

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions