Microsoft: Users Can Now Code Python Directly in Excel

Access popular Python libraries like pandas and Matplotlib from Excel

Ben Wodecki, Jr. Editor

August 24, 2023

2 Min Read

At a Glance

  • Microsoft's new public preview lets Excel users write and run Python code within spreadsheet cells.
  • Users can now build machine learning processes and analytics tools right from Excel.

Users can now use Python in Excel. They can type Python directly into a cell to create visualizations and machine learning models right from a spreadsheet. Microsoft has released a public preview of the popular coding language in its spreadsheet application.

The new PY function allows access to Python – no external downloads are required.

Microsoft partnered with Anaconda to bring Python to Excel, with Excel users now able to access some of the most popular Python libraries including pandas, Matplotlib and scikit-learn securely from their device’s spreadsheet application.

Stressing user privacy when using the new offering, Microsoft said Python Code on Excel runs in its own hypervisor-isolated container using Azure Container Instances as well as source-built packages from Anaconda to keep user data private.

Adding to the security features, Python data from Excel workbooks can only be sent via the built-in xl() Python function, and the output of the Python code can only be returned as the result of the =PY() Excel function.

Guido van Rossum, the creator of the Python programming language, helped define the architecture for Python in Excel. He said: “I expect that both communities will find interesting new uses in this collaboration, amplifying each partner's abilities.”

Related:Microsoft Offers Private, Customizable ChatGPT to Enterprises

How can I access Python in Excel?

Python in Excel is available to users running Beta Channel on Windows.

To access it, you’ll need to join the Microsoft 365 Insiders program.

Microsoft plans to improve autocomplete and syntax highlighting for Python in Excel as well as updates to address error behaviors.

Head here if you want to be notified about the future wider availability of Python in Excel.

Microsoft offers branches to AI developers

Opening Excel to Python offers developers a new way to build machine learning and analytics offerings.

Microsoft’s decision to integrate the popular programming language comes as Google is trying to entice developers away from Microsoft’s VS Code application with the new Project IDX. The browser-based developer space plans to offer users an easy-to-access suite of tools to develop machine learning projects – including Firebase, Google’s freemium web app development platform, and Google Cloud security features.

Alongside offering Python in Excel to limit Google's attempts to tempt developers to switch, Microsoft is giving access to ChatGPT on their own customizable servers. The new ChatGPT on Azure can be used for enterprise use cases.

About the Author(s)

Ben Wodecki

Jr. Editor

Ben Wodecki is the Jr. Editor of AI Business, covering a wide range of AI content. Ben joined the team in March 2021 as assistant editor and was promoted to Jr. Editor. He has written for The New Statesman, Intellectual Property Magazine, and The Telegraph India, among others. He holds an MSc in Digital Journalism from Middlesex University.

Keep up with the ever-evolving AI landscape
Unlock exclusive AI content by subscribing to our newsletter!!

You May Also Like