Microsoft

Microsoft Integrates Python Into Excel Natively

It’s a major update for Excel that significantly expands the analysis capabilities. Microsoft has announced that it has natively integrated Python into the program. It can now be tried out in the public preview.

The integration is smooth and can be used without setup

Microsoft calls it a “significant advancement” of the analytical capabilities available in Excel. As the company announced today, in addition to the usual tools such as formulas, charts, and PivotTables, Python is now also directly integrated into the Excel grid. With the new function =PY(), Python code can be entered directly into the cells of the program.

For the integration, Microsoft relies on the Anaconda Distribution for Python on Azure, a leading enterprise Python repository. This means that the most common Python libraries (e.g. pandas, Matplotlib, sci-kit-learn, etc.) are directly available in Excel. “A major breakthrough that will transform the way millions of Excel users work around the world,” said Peter Wang, CEO and co-founder of Anaconda.

According to the developers, the code is executed in an isolated container in the Microsoft cloud and then returned as a result of the Excel function =PY(). Microsoft sees the strengths of the new function primarily in the areas of visualization, data cleansing, and machine learning. With Excel’s built-in connectors and Power Query, users can also integrate external data in Python into Excel.

This is how you can use it

If you want to use Python in Excel now, you have to join the Beta Channel for Windows. First, you join the Microsoft 365 Insider program and then choose the Insider level “Beta Channel”, in which the latest builds of Excel are played. According to Microsoft, the feature will first be introduced in Excel for Windows, starting with build 16.0.16818.2000. It will then be transferred to the other platforms at a later date.