Office.js API support for Power Query editing (enable Copilot & AI integration) | Microsoft Community Hub (opens in new tab)
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 transformationsC...
Read the original article