Excel plug-ins for Anaconda¶
Anaconda on Windows comes ready to interact with Microsoft Excel–quickly, intuitively, and powerfully. You can use one of the many included packages in Anaconda or you can connect to an outside integration tool to bring the power of Python into Excel.
The packages described here are available only on Windows unless otherwise noted. Like most Anaconda packages, this software is written by third-party open-source development teams around the world. Anaconda collects and curates these programs, builds them into conda packages, and distributes them through the Anaconda platform so our users can enjoy the benefits of easy installation, version control, package management, and environment management.
What tool should I use?¶
For a versatile, all-purpose tool, Anaconda includes xlwings, which incorporates the following features:
- Drives Excel interactively from an IPython Session/Notebook.
- Performs one-line conversion to and from a NumPy array or pandas DataFrame.
- Uses Python as Excel’s computation backend by wrapping Python function calls in VBA macros.
- Easily shares Python-integrated Excel workbooks with collaborators who are also running Anaconda, with no additional installation needed.
The xlwings package is in active development. Additional features may be added in the future. This package is available for Windows and macOS platforms.
To export data from a Python object into Excel or import the contents of an Excel spreadsheet to perform calculations or visualizations in Python, Anaconda includes the following libraries and modules:
- openpyxl–Read/write Excel 2007 xlsx/xlsm files.
- xlrd– Extract data from Excel spreadsheets–.xls and .xlsx, versions 2.0 onwards–on any platform.
- xlsxwriter–Write files in the Excel 2007+ XLSX file format.
- xlwt–Generate spreadsheet files that are compatible with Excel 97/2000/XP/2003, OpenOffice.org Calc, and Gnumeric.
To determine which one best suits your needs, see the documentation for each library or module.
Python-Excel tools not included in Anaconda¶
- ExcelPython–A free, open-source library that lets you write UDFs and macros in Python, as well as load Python modules, call methods, and manipulate objects from VBA without modifying the original Python code.
- XLLoop–Open-source software that implements UDFs that are hosted from a server in a variety of languages, including Python, Java, C++, and R. Installation requires multiple steps to set up the provided Excel add-in and configure the UDF server.
- ExPy–Freely available demonstration software that is simple to install. Once installed, Excel users have access to built-in Excel functions that wrap Python code. Documentation and examples are provided at the site.
- PyXLL–A widely used tool that is free for personal or educational use. It implements UDFs written in Python as add-in functions for Excel.