Developing an Excel addin using PyXLL has several advantages over other methods of writing addins.

  • Focus on the code you want to write without worrying about the details of the Excel C API. It's just Python code!
  • User defined functions, custom menus and macros can be created.
  • Python comes with a vast array of standard libraries. Whatever you need, the chances are there's a Python module to help you.
  • There's nothing to compile. You can change, add or remove functions and see your changes without even restarting Excel!
  • Deployment problems that plague other Excel addins are solved by PyXLL! Your Python code can happily reside on a network drive and PyXLL can load them from there. Pushing out a new version becomes as simple as copying some files. You never have to worry that someone isn't using the latest version of your addin.
  • Code testing outside of Excel is easy. You can import your PyXLL modules the same way your would any other modules using the normal Python interpreter outside of Excel. You can even use your favorite unit testing framework.
  • Sharing code between your addin and other Python modules and applications is possible. Your Excel functions are simply Python functions so you can import and use them wherever is appropriate. Likewise, your Addins can import any of your other Python modules just as easily.
  • Call back into Excel using win32com to do everything that you can do in VBA.
  • NumPy support. Pass ranges of values as numpy arrays to your functions, and for array functions you can return numpy arrays.
  • Functions where performance is critical can be written in C/C++ and compiled into a python module using the Python C API (or Boost Python, SWIG, Cython or just by using the ctypes module) and then called from your addin.
  • Version control can be handled using your normal version control system. Python modules are just text. Anyone who's written or had to support addins written in VBA knows that that's a good thing.
  • Works with all versions of Excel from 97 to 2010