Home » today » Technology » Microsoft Brings Python to Excel: Combining Programming and Analytics in the World’s Most Popular Spreadsheet

Microsoft Brings Python to Excel: Combining Programming and Analytics in the World’s Most Popular Spreadsheet

Microsoft has added support for running Python code from within Excel, bringing the world’s most popular programming language, by some measures, into the world’s most popular spreadsheet.

Sorry, Visual Basic.

“Today, we’re excited to present the public preview of Python in Excel — making it possible to combine Python and Excel analytics within the same Excel grid for a seamless workflow,” said Stefan Kinstrand, general manager of product marketing at Microsoft. blog post.

To achieve this, Microsoft has partnered with Anaconda, which provides a data science-oriented Python distribution, including popular libraries such as Pandas and Matplotlib.

“I am pleased to announce that Anaconda Distribution’s open data science platform is integrating Python with Microsoft Excel, a major breakthrough that will change the workflow of millions of Excel users around the world,” said Peter Wang, CEO and Founder of Anaconda. Disclaimer.

“This integration represents an important milestone that accelerates adoption of the Python language and addresses longstanding demand from our community.”

The hope is that easy access to Python will enable Excel users to create more complex visualizations, data manipulation and analysis, and machine learning with their spreadsheet data.

Anaconda’s Python will live in the comfortable, temperature-controlled environment of Microsoft Azure. The rationale for doing this is that it prevents Excel users from managing the potential complexity of configuring Python on a local machine.

And Anaconda’s Python cloud home will be more secure than Excel users downloading the libraries themselves. After anticipating concerns about another attack vector being enabled in Excel, Microsoft previously announced that its python was tamed.

B attack Regarding data security and Python in Excel, Redmond lists the following additional points.

Excel’s Python code runs on isolated hypervisor containers built on Azure Container instances. The container contains Python and a curated set of secure libraries provided by Anaconda. Python code does not have access to a user’s computer, devices, account, network, any user token, or workbook properties, including formulas, charts, PivotTables, macros, and Visual Basic code.

Python developers have long been able to create code that reads and writes data to and from Excel spreadsheets using libraries such as OpenPyXL. But Microsoft seems to be betting that its back-end management and programmable spreadsheets will be a more attractive option.

Writing Python code in Excel’s public preview — now available through the beta channel for those in the Microsoft 365 Insiders program, and coming first to Excel for Windows version 16818 — is just a matter of running the Python function (=PY) and writing code Python in this spreadsheet cell.

“Python in Excel uses a custom Python function xl() The interaction between Excel and Python,” Microsoft Explain in documenting it. “The xl() function accepts Excel objects such as ranges, tables, queries, and names.”

Importing external data can be done using the included Excel file and connectors Energy queryMicrosoft data processing tools.

Since this is just a general preview, Kinstrand said users should expect more editing-related improvements, such as autocomplete, syntax highlighting, error behaviors, and so on. He said there are currently data and compute size limits to prevent misuse, which means an increased demand on Microsoft Azure resources. ®

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.