Skip to content
AI news · Microsoft

Copilot can now run Python inside your Excel workbook

By , Founder of Adaptd · · Updated

Edit with Copilot can write and run Python inside Excel on desktop and in the browser, putting the results straight back into the sheet.

The short version

  • Microsoft has added Python to Edit with Copilot in Excel on Windows, Mac and the browser.
  • You describe the job, Copilot writes and runs the code, and existing security controls still apply.
  • Check new analyses against a number you know.

Microsoft has added Python to Edit with Copilot in Excel, so Copilot can write and run code on your data.

What can Copilot do with Python in Excel?

Edit with Copilot in Excel can now write and run Python for you, on Windows, on Mac and in the browser. You describe what you want, Copilot writes and runs the code, and the results go directly into the workbook.

Microsoft gives examples like summarising trends, cleaning up messy data, or building a visualisation with Python. That covers work which was awkward or impossible with formulas alone, such as a proper statistical check or a chart Excel could not draw on its own. Existing security and execution controls still apply, so this sits inside whatever rules your organisation already has rather than around them.

Why does Python in Excel matter for a midsize business?

Python in Edit with Copilot changes who can do this kind of data work. Cleaning a messy export, reconciling two lists, or running a quick statistical check used to mean either a very patient person with formulas or someone who could write code. Now it means describing the job in the sheet where the data already lives.

A monthly report that someone rebuilds by hand is the first thing to point it at.

How do you use Copilot's Python safely?

The caution is the obvious one with generated code: it runs, and it looks confident, and that is not the same as correct. Check the output against a number you already know before you trust a new analysis, especially when the source data is messy. Keep the original data on its own tab so you can always see what the code started from.

And be careful pointing it at anything containing client or personal information until you know how your organisation's controls apply.

Wondering what this means for your business?

That's exactly what the discovery call is for.