Introducing the Anaconda Code add-in for Microsoft Excel
Emilie Lewis
Timothy Hewitt
Excel and Python users can now run their Python-powered projects in Excel locally with the Anaconda Code add-in
“I wish there was a way for me to run my Python in Excel locally, without having to run my calculations through Microsoft Cloud.”
Since Python in Excel was introduced in August 2023, a clear piece of feedback we’ve heard from the community was the desire to run Python locally rather than through Microsoft Cloud, which is what happens when you use Python in Excel.
Today we are launching the public beta of Anaconda Code, which allows users to run Python code locally in Excel. The technology behind Anaconda Code is powered by PyScript, an Anaconda supported open source project that runs Python locally without install and setup. If you want to learn more about PyScript, visit pyscript.net.
By bridging the gap between traditional spreadsheet use and advanced coding practices, this solution grants users access to a wider Python ecosystem, enhancing data analysis capabilities while maintaining Excel’s core strengths.
Users can start using Anaconda Code today by visiting AppSource, Microsoft’s add-in marketplace, and downloading the Anaconda Toolbox.
What are the Key Differences Between Python in Excel and Anaconda Code?
For users looking for more control over their environments in Microsoft Excel or faster performance, Anaconda Code is a great option for running Python code while in Excel.
Some other key differences include:
Cells Run Independently
In addition to running Python code cells in “row major order” – meaning any cells with Python code will re-run anytime any Python cell has a change – Anaconda Code can also run cells independently, so the cells containing Python are only re-run if the cell itself is modified. Users can’t reference variables defined in other cells, though they can reference the value returned from a cell, resulting in a much faster run. There is the option to run your Python code in row-major order, but it is not the default setting.
Range to Multiple Types
When you’re working with a table of data in Python, a pandas dataframe may be just the thing for you. But sometimes you want a NumPy array, or maybe all you need is a list. With Anaconda Code, you have the freedom to choose.
Editable Initialization
Currently, Microsoft Excel’s init.py file is static and cannot be edited. With Anaconda Code, users have the ability to access and edit imports and definitions, allowing you to write top-level functions and classes and reuse them wherever you need.
A Customizable Environment
Anaconda Code allows users to customize their environment to their specific needs. Users can simply select which packages they want to use from PyPI (WASM limitations do apply) and get started. Once an environment is created, it will be pinned so when users share workbooks, the spreadsheet will retain the exact environment for all other users.
Start Using Anaconda Code Today
Anaconda Code is currently in public beta and can be accessed through the Anaconda Toolbox add-in available in AppSource, Microsoft’s add-in marketplace. Users will need to have or create an Anaconda.cloud account to gain full access to Anaconda Toolbox and Anaconda Code.
Users can leave feedback and ask questions by visiting the Anaconda Code topic page on community.anaconda.cloud.
Talk to an Expert
Talk to one of our experts to find solutions for your AI journey.