Copilot agents can now run Python code on Excel and CSV files in SharePoint

Microsoft announced that Copilot Studio agents will gain the ability to generate and run Python code against structured files stored in SharePoint. The feature supports data preparation, statistical analysis, joins, forecasting, and simple chart creation. It uses the GPT-4.1 model and applies when files are added as knowledge sources or live in document libraries. General availability is set for 31 May 2026 with no user action required for rollout. The change applies only to agents built in Copilot Studio, not to the standard Copilot already available in Word, Excel, or Teams.
Before this update, agents could only retrieve and summarise documents. Any calculation or chart required users to export data, open Excel or Power BI, and rebuild the work manually. The new capability keeps that analysis inside the agent conversation. For teams already struggling to get basic Copilot adoption above single digits, the addition of code execution raises the skill floor rather than lowering it. Most users who cannot yet write a reliable prompt for a meeting summary now face an even wider gap between what the tool can do and what they know how to ask it to do.
Analysis
This is not a reason to rush into agent building. Run one narrow test with a single SharePoint folder containing last quarter's sales CSV, create the simplest possible agent, and measure whether it produces usable numbers before the next budget conversation.
Pulse published by Collab365 Spaces. Cite as "Copilot agents can now run Python code on Excel and CSV files in SharePoint", Collab365 Spaces. 1 source referenced.