Tags: sbroenne/mcp-server-excel
Tags
feat(vscode): add status bar MCP monitor with session management (#304) * feat(vscode): add status bar MCP monitor with session management - Add StatusBarMcp component showing connection status and session count - Add McpClient wrapper for vscode.lm.tools with polling - Add Quick Pick UI for session list with Close/Save & Close actions - Status bar hidden until MCP server responds (clean UX) - Add excelMcp.showSessions command to command palette Testing (NO MOCKS - real MCP server + real Excel): - 16 integration tests (status bar, MCP server, session lifecycle) - 29 unit tests (mcpClient, statusBarMcp, showSessionsQuickPick) - McpTestClient spawns real MCP server subprocess via JSON-RPC Spec: specs/002-statusbar-mcp-status/ * fix(ci): expand allowed licenses and limit to runtime deps - Add permissive licenses: CC0-1.0, CC-BY-3.0, CC-BY-4.0, Unlicense, BlueOak-1.0.0, Python-2.0, Artistic-2.0, WTFPL, Zlib - Only check runtime dependencies (dev deps don't ship with extension) - Fixes dependency-review failure on PR #304 * fix(vscode): update tsconfig for TypeScript 7.0 compatibility - Change moduleResolution from 'Node' to 'Node16' (deprecated in TS 7.0) - Change module from 'CommonJS' to 'Node16' (required with Node16 resolution) - Remove redundant onCommand activation event (auto-generated by VS Code) * chore: remove trailing whitespace in dependency-review.yml
feat(vscode): add status bar MCP monitor with session management (#304) * feat(vscode): add status bar MCP monitor with session management - Add StatusBarMcp component showing connection status and session count - Add McpClient wrapper for vscode.lm.tools with polling - Add Quick Pick UI for session list with Close/Save & Close actions - Status bar hidden until MCP server responds (clean UX) - Add excelMcp.showSessions command to command palette Testing (NO MOCKS - real MCP server + real Excel): - 16 integration tests (status bar, MCP server, session lifecycle) - 29 unit tests (mcpClient, statusBarMcp, showSessionsQuickPick) - McpTestClient spawns real MCP server subprocess via JSON-RPC Spec: specs/002-statusbar-mcp-status/ * fix(ci): expand allowed licenses and limit to runtime deps - Add permissive licenses: CC0-1.0, CC-BY-3.0, CC-BY-4.0, Unlicense, BlueOak-1.0.0, Python-2.0, Artistic-2.0, WTFPL, Zlib - Only check runtime dependencies (dev deps don't ship with extension) - Fixes dependency-review failure on PR #304 * fix(vscode): update tsconfig for TypeScript 7.0 compatibility - Change moduleResolution from 'Node' to 'Node16' (deprecated in TS 7.0) - Change module from 'CommonJS' to 'Node16' (required with Node16 resolution) - Remove redundant onCommand activation event (auto-generated by VS Code) * chore: remove trailing whitespace in dependency-review.yml
fix(power-query): Handle COM error when regular Excel tables present (#… …303) When Power Query commands (View/Update) iterated ListObjects, they failed with COM error 0x800A03EC when regular Excel tables were present because accessing .QueryTable on non-query tables throws. Changes: - PowerQueryCommands.View.cs: Wrap listObj.QueryTable access in try-catch, skip non-query tables - PowerQueryCommands.Update.cs: Wrap listObj.QueryTable access in try-catch, skip non-query tables - Add regression tests for View and Update with manual tables present - Verify ListObjects iteration is robust to mixed table types Regression tests: - View_WorkbookWithManualTable_ReturnsQueryDetails - Update_WorkbookWithManualTable_UpdatesQuerySuccessfully All Power Query integration tests pass (14 tests). Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
fix(power-query): Handle COM error when regular Excel tables present (#… …303) When Power Query commands (View/Update) iterated ListObjects, they failed with COM error 0x800A03EC when regular Excel tables were present because accessing .QueryTable on non-query tables throws. Changes: - PowerQueryCommands.View.cs: Wrap listObj.QueryTable access in try-catch, skip non-query tables - PowerQueryCommands.Update.cs: Wrap listObj.QueryTable access in try-catch, skip non-query tables - Add regression tests for View and Update with manual tables present - Verify ListObjects iteration is robust to mixed table types Regression tests: - View_WorkbookWithManualTable_ReturnsQueryDetails - Update_WorkbookWithManualTable_UpdatesQuerySuccessfully All Power Query integration tests pass (14 tests). Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
fix: prevent orphaned Power Query connections during worksheet loading ( #299) Root Cause: ListObjects.Add() with connection STRING creates orphaned connections with generic names (Connection, Connection1, etc.) Solution: - Use Connections.Add2() to create properly named connections first - Pass connection OBJECT to ListObjects.Add() to reuse the connection - For LoadToBoth: create TWO connections with distinct names: - Worksheet: 'Query - {name}' - Data Model: 'Query - {name} (Data Model)' - Updated pattern matching in Delete/Unload/List/GetLoadConfig Test Coverage: - 14 new worksheet cleanup tests - 9 lifecycle cleanup tests - All 74+ Power Query tests passing Fixes #298 Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
fix: prevent orphaned Power Query connections during worksheet loading ( #299) Root Cause: ListObjects.Add() with connection STRING creates orphaned connections with generic names (Connection, Connection1, etc.) Solution: - Use Connections.Add2() to create properly named connections first - Pass connection OBJECT to ListObjects.Add() to reuse the connection - For LoadToBoth: create TWO connections with distinct names: - Worksheet: 'Query - {name}' - Data Model: 'Query - {name} (Data Model)' - Updated pattern matching in Delete/Unload/List/GetLoadConfig Test Coverage: - 14 new worksheet cleanup tests - 9 lifecycle cleanup tests - All 74+ Power Query tests passing Fixes #298 Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
docs: update tool/operation counts and lists to match code (#290) Fixes #289 - Update MCP Server: 12 tools, 180 operations - Update CLI: 13 command groups, 172 operations - Fix gh-pages/index.md operation tables: - PivotTables: 25 → 30 (added calculated fields/members, grouping, layout) - DataModel: 15 → 16 (added delete-table) - File: 5 → 6 (added list) - Worksheets: added set-visibility - Removed non-existent operations from tables - Update readme-management.instructions.md with verification guidance - Update GitHub repo description and topics Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
perf: Optimize PivotTable RefreshTable() calls (#286) * perf: Remove unnecessary RefreshTable() calls and optimize test fixtures Performance optimizations: 1. Remove unnecessary RefreshTable() from visual-only operations: - SetFieldFormat (OLAP + Regular) - NumberFormat is visual only - SetSubtotals (OLAP + Regular) - removed 2 calls each - SetLayout (OLAP + Regular) - layout changes don't need refresh - SetGrandTotals (OLAP + Regular) - visual setting - SortField (OLAP + Regular) - sorting is visual - SetFieldName (Regular only) - OLAP throws exception 2. Fix SetFieldFunction measure lookup bug: - Added NormalizeMeasureName() helper to extract measure name from [Measures].[Name] format - Fixed lookup to use normalized name 3. Optimize test fixture sharing: - Changed from IClassFixture (1 fixture per class) to ICollectionFixture (1 fixture for ALL classes) - Created DataModelTestsDefinition collection for 6 test classes - Reduces fixture setup from ~9 min to ~1.5 min 4. Fix test measure name conflict: - Changed AddValueField test to use 'Regional Sales Total' instead of 'Total Sales' Total RefreshTable() calls removed: 13 Test classes now sharing fixture: 6 * test: Add diagnostic tests for RefreshTable() behavior Add 9 raw Excel COM API tests to empirically determine: - Which PivotTable operations require RefreshTable() - Which operations work immediately without RefreshTable() - Persistence behavior with and without RefreshTable() Key findings documented: - Structural changes (Orientation) need RefreshTable() for persistence - Visual properties (NumberFormat) work after structure is refreshed - In-memory operations don't need refresh for immediate effect * perf: Remove 2 more unnecessary RefreshTable() calls Based on diagnostic tests proving persistence works without refresh: - SetFieldFunction: Function changes persist without RefreshTable() - SetFieldFilter: Filter changes persist without RefreshTable() Added 2 new diagnostic tests: - FunctionChange_Persistence_WithoutRefresh_VerifySaveAndReopen - FilterChange_Persistence_WithoutRefresh_VerifySaveAndReopen Total RefreshTable() calls removed: 15 (13 initial + 2 additional) --------- Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
docs: update tool/operation counts and lists to match code (#290) Fixes #289 - Update MCP Server: 12 tools, 180 operations - Update CLI: 13 command groups, 172 operations - Fix gh-pages/index.md operation tables: - PivotTables: 25 → 30 (added calculated fields/members, grouping, layout) - DataModel: 15 → 16 (added delete-table) - File: 5 → 6 (added list) - Worksheets: added set-visibility - Removed non-existent operations from tables - Update readme-management.instructions.md with verification guidance - Update GitHub repo description and topics Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
perf: Optimize PivotTable RefreshTable() calls (#286) * perf: Remove unnecessary RefreshTable() calls and optimize test fixtures Performance optimizations: 1. Remove unnecessary RefreshTable() from visual-only operations: - SetFieldFormat (OLAP + Regular) - NumberFormat is visual only - SetSubtotals (OLAP + Regular) - removed 2 calls each - SetLayout (OLAP + Regular) - layout changes don't need refresh - SetGrandTotals (OLAP + Regular) - visual setting - SortField (OLAP + Regular) - sorting is visual - SetFieldName (Regular only) - OLAP throws exception 2. Fix SetFieldFunction measure lookup bug: - Added NormalizeMeasureName() helper to extract measure name from [Measures].[Name] format - Fixed lookup to use normalized name 3. Optimize test fixture sharing: - Changed from IClassFixture (1 fixture per class) to ICollectionFixture (1 fixture for ALL classes) - Created DataModelTestsDefinition collection for 6 test classes - Reduces fixture setup from ~9 min to ~1.5 min 4. Fix test measure name conflict: - Changed AddValueField test to use 'Regional Sales Total' instead of 'Total Sales' Total RefreshTable() calls removed: 13 Test classes now sharing fixture: 6 * test: Add diagnostic tests for RefreshTable() behavior Add 9 raw Excel COM API tests to empirically determine: - Which PivotTable operations require RefreshTable() - Which operations work immediately without RefreshTable() - Persistence behavior with and without RefreshTable() Key findings documented: - Structural changes (Orientation) need RefreshTable() for persistence - Visual properties (NumberFormat) work after structure is refreshed - In-memory operations don't need refresh for immediate effect * perf: Remove 2 more unnecessary RefreshTable() calls Based on diagnostic tests proving persistence works without refresh: - SetFieldFunction: Function changes persist without RefreshTable() - SetFieldFilter: Filter changes persist without RefreshTable() Added 2 new diagnostic tests: - FunctionChange_Persistence_WithoutRefresh_VerifySaveAndReopen - FilterChange_Persistence_WithoutRefresh_VerifySaveAndReopen Total RefreshTable() calls removed: 15 (13 initial + 2 additional) --------- Co-authored-by: Stefan Broenner <stefan.broenner@microsoft.comm>
PreviousNext