Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Power Query update fails with 0x800A03EC when Data Model is present#324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sbroenne merged 1 commit intomainfromfix/power-query-data-model-update-error
Dec 17, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletiondocs/COM-API-BEHAVIOR-FINDINGS.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -131,7 +131,31 @@ foreach (Connection in workbook.Connections)

**Implication:** `Unload` method in `PowerQueryCommands.Lifecycle.cs` needs to also remove Data Model connections.

### Scenario 12: Query Renaming
---

### Scenario 15: Data Model State Blocks Formula Updates (UNRESOLVED)

**FINDING: WorkbookQuery.Formula becomes read-only in certain workbook states**

**Error Code:** `0x800A03EC` (-2146827284) - "Application-defined or object-defined error"

**Symptoms:**
- `query.Formula = mCode` fails with 0x800A03EC on some workbooks
- Error affects ALL queries in the workbook, not just Data Model queries
- Error is workbook-specific - same queries work fine in fresh workbooks

**Attempted Solutions (Did NOT Work):**
1. **Save-and-retry**: Saving workbook before retry did NOT clear the error state
2. **Polly retry with backoff**: Error is NOT transient - retries don't help
3. **File location**: Copying file from OneDrive to local drive did NOT help

**Current Status:** Root cause unknown. The error appears to be related to internal Excel state that cannot be cleared programmatically via COM automation. Workaround: manually save and reopen the workbook in Excel UI.

**See:** GitHub Issue #323

---

### Scenario 16: Query Renaming

**FINDING: Renaming a query breaks the connection to the table**

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
using Polly;
using Sbroenne.ExcelMcp.ComInterop;
using Sbroenne.ExcelMcp.ComInterop.Session;

Expand DownExpand Up@@ -203,11 +202,10 @@ public void Update(IExcelBatch batch, string queryName, string mCode, bool refre
if (existingQueryTable != null) break;
}

// STEP 3: Update the M code with retry for Data Model-connected queries
// The 0x800A03EC error can occur when updating queries loaded to Data Model
// See GitHub Issue #316 for details
ResiliencePipeline pipeline = ResiliencePipelines.CreatePowerQueryPipeline();
pipeline.Execute(() => query.Formula = mCode);
// STEP 3: Update the M code
// Note: 0x800A03EC error can occur in certain workbook states (see Issue #323)
// Retry doesn't help - it's a workbook state issue, not transient
query.Formula = mCode;

// STEP 4: Refresh if requested
if (refresh)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp