Python Integration in Microsoft Excel

Introduction

Most developers will never admit it, but that game-changing new app they're building probably could have just been an Excel spreadsheet. Excel, which came out in 1985, could be the single most important piece of software for our modern service-based economy. Working with Excel formulas at my dead-end white-collar job is actually where I got my first taste of programming. I used formulas to figure out that I would never be able to own a house unless I got a higher-paying job.

Python in Excel

But you can't do real programming with Excel. It is possible to hook it up with Visual Basic, but that's just way too Microsofty. Luckily, as of yesterday, Microsoft Excel will now support Python, a feature developed in collaboration with the creator of Python, Guido van Rossum, which is totally awesome. Here's how it'll work: in Excel, you have access to this new Pi formula which can run Python code against the data in your spreadsheet. For example, if you want to put your data into a pandas DataFrame, you can now accomplish that by simply highlighting your data and running the corresponding Python code.

Another huge benefit is the ability to use Python database packages like Seaborn and Matplotlib. More importantly, though, it allows developers to write their own custom functions that can wrangle and clean real-world data sets, which can be fed to the hungry AIs. In fact, you could even do machine learning directly in your spreadsheet with tools like Scikit-Learn. That's pretty cool, but don't expect it to train deep learning models with tools like PyTorch and TensorFlow.

The Industry Transformation

The key to success is that your Python code does not run locally but instead runs in Microsoft's Azure Cloud. This will, of course, keep you safe from the dangers of spreadsheets and also from the hassle that is managing your Python versions locally. They teamed up with Anaconda to create a standard runtime for running Python in Excel in Azure. However, being able to run Python locally offline is far more privacy-friendly and would be faster in most situations. The only problem is that Microsoft then wouldn't have a product to sell you.

You could switch to Linux and run LibreOffice, which has support for macros in both JavaScript and Python. It has had those features forever, but good luck convincing your boss that's a good idea. It's just too free and too open-source. Python in Excel is going to be a game changer for the boring corporate world. Over the last few years, I've been using Google Sheets with Apps Script, which is one of the most underrated tools out there. It's the same basic idea as Excel and Python but with JavaScript. I use it for a variety of business-related needs, like automating the shipment of t-shirts and stickers to Fireship Pro members, and it can even be used to create custom menus and dialogues. However, Python is a far more powerful language when it comes to data analysis.

Conclusion

What this means is that virtually every white-collar worker will now be able to generate some Python code with ChatGPT, copy and paste it into Excel, and solve the vast majority of common problems out there. Microsoft will be the one running and hosting this code. They already have the most powerful AI models, and those models will only grow bigger and stronger over time. Nobody's even close to Microsoft right now in the AI race, and that's a result of their developer-friendly strategy, which can be broken down into three steps:

First, they embrace the developer community—developers, developers, developers. Then, they extend developers with awesome new features and tools. Finally, I seem to have forgotten what the third step is, but this has been for this blog . Disclaimer: The features mentioned in this blog post are based on initial reports and are subject to further validation.

Sources:

  • google
  • fireship

Related Posts

Apple's New Technology: Talk to Yourself with Just 15 Minutes of Training

Have you ever wished your iPhone could speak in your own voice? Well, Apple is making that a reality with its latest breakthrough in technology. Imagine being able to have your iPhone communicate i

Read More

Android 14 : Features you need to know

## Introduction The release of the second Android 14 beta at Google I/O 2023 has given us a glimpse into the upcoming Android update. With its stable release expected later this year, Android 14 brin

Read More

Apple Vision Pro: A Revolutionary VR Headset or Dystopian Flop?

## Introduction: ![vision pro](https://www.apple.com/newsroom/images/media/Apple-WWCD23-Vision-Pro-glass-230605_big.jpg.large.jpg) Hey there, folks! It's June 7, 2023, and you're about to dive into

Read More