folotp
Jun 10, 2026Occasional Reader
Status:
New
Office.js API support for Power Query editing (enable Copilot & AI integration)
The Office.js API currently supports refreshing Power Query connections but provides no capability to read, create, edit, or delete Power Query (M code) definitions programmatically.
Use Case — AI Assistant Integration:
AI assistants (Microsoft Copilot, Claude, ChatGPT, etc.) interact with Excel via the Office.js API. Users increasingly expect these tools to help build and maintain Power Queries. Currently, AI assistants cannot:
- Read existing M code to understand or explain data transformations
- Create new Power Queries from natural language descriptions
- Edit or debug problematic queries
- Delete obsolete queries
- Update connection strings, file paths, or query parameters programmatically
This represents a significant gap given Microsoft's investment in Copilot for Excel and the broader AI-assisted productivity vision.
Requested API Capabilities:
- Read M code from existing queries
- Create new queries programmatically
- Edit M code for existing queries
- Delete queries
- Modify query parameters (file paths, connection strings)
- Access query metadata (name, last refresh, error status, dependencies)
Impact:
- Enables Copilot and third-party AI tools to fully assist with Power Query authoring
- Democratizes Power Query by letting AI explain and write M code for non-technical users
- Aligns with Microsoft's AI-first strategy for productivity tools
Platform: All platforms (Windows, Mac, Web)
No CommentsBe the first to comment