New Changes in Python in Excel

2023-08-24

Excel spreadsheets have just undergone a major improvement. Microsoft has announced the public preview version of Python in Excel. Now, developers or data analysts do not need to install any additional software to access the functionality, as the built-in connectors and Power Query in Excel will be bundled with Python integration. Microsoft has also added a PY function that allows Python data to be used in the grid of the spreadsheet.

In Microsoft's blog, Stefan Kinnestrand explains that users will now be able to leverage Python for advanced data analysis in the familiar Excel interface, and this feature will appear in the Excel ribbon. "You can use Python charts and libraries to manipulate and explore data in Excel, and then refine your insights further with Excel's formulas, charts, and pivot tables," he adds.

This announcement is made in collaboration with the enterprise Python distribution Anaconda, which includes libraries such as pandas, statsmodels, seaborn, and Matplotlib. Microsoft has adopted a cloud-based approach by using Anaconda Python distribution on Azure.

These features will be gradually rolled out in the Microsoft 365 Insiders testing channel for Windows, only available for the desktop version of Excel and running on Microsoft's cloud.

Why choose a cloud-based approach?

It is worth noting that developers and data analysts have different reactions to this release.

Integrating Python into Excel has always been something developers have been trying to do, using tools like Pandas read excel, OpenPyXL, PyXLL, etc. However, with Microsoft's native integration, advanced spreadsheet users can integrate Python language scripts and Excel formulas into one workbook without the need for any additional software. This will also allow for a collaborative notebook experience in the cloud.

The only concern people have is why it runs entirely in the cloud instead of locally. Python can now run perfectly fine locally without the need for a connection to Microsoft's cloud to perform tasks. Despite the availability of important libraries through Azure cloud, people choose not to embrace this change due to the lack of a local execution option.

In a discussion on Reddit, one user said, "Python is a very lightweight runtime, why not include it in the software instead of requiring an internet connection, which could be slower than running the code locally on a low-end laptop." Additionally, some users believe that scripting on the internet could be a nightmare, as seen with scripting on Google Docs.

On the other hand, people argue that while Python is lightweight, running libraries like Scipy and Matplotlib requires significant computation. To compensate for this, Microsoft has integrated them into their cloud services, making them widely available. Or as some have pointed out, it's simply a way to get more people to subscribe to their cloud services and generate profits for Microsoft in the cloud.

Well, now everything works

There has been a long-standing debate about Python gradually taking over Excel's market share, even declaring it dead. However, people still find Excel comfortable for data analysis. It can undoubtedly be said that integrating Python into Excel is a significant step forward for those trying to work with Python on Excel, contributing to the modernization of software for data analysis. It seems that those who claimed Excel is not a programming language will soon return to Excel, and Excel users will soon start learning Python.

Nevertheless, deploying it only in the cloud raises security and data privacy concerns, even with the collaboration with Anaconda. To address privacy concerns, Microsoft states that they provide "enterprise-grade security," meaning the code will run on cloud-isolated containers without network access, which may still pose risks for many customers.

A user on HackerNews said, "The cloud part will be a huge barrier for many industries. This would definitely be blocked by default in my workplace." Companies that allow local use of Excel and Python and want to integrate both functionalities into one framework still do not want to transmit their data and Python code outside their servers.

This marks an important step towards running AI applications that generate code on Excel. In January of this year, Microsoft announced that they would be experimenting with using GPT in their productivity applications.

Interestingly, Microsoft has been moving along this path - acquiring GitHub, acquiring OpenAI to help them create Copilot for writing Python code, code interpreter on ChatGPT, AI assistance on PowerBI, and now Python in Excel. What's next? Will AI be able to write Python on our Excel spreadsheets? Exciting times are ahead!

RECENT AI NEWS

RECENT AI TOOLS