Python Forum

Full Version: Deploying Python-based excel plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Apologies if this question has already been answered or is a bit amateur.
I'm just starting on Python development (have experience with C#, VB before)

I have a pretty basic requirement. I would like to write a Python script that automates a certain analytical task based on user-defined inputs, while retaining the interface in Excel.

What I would like in terms of user experience is:
The user should be able to run the underlying Python code from a button on the Excel ribbon, without having any Python-based dependencies (e.g. installing xlwings or even having to install Python on their systems).
I would like to ship the installation package for installing the Excel plugin which would take care of all dependencies required to run the Python code.

Is this possible, or am I better off relying on Microsoft based solutions?
After spending the entire morning looking around for a solution, I believe this might not be as "basic" as I thought.

Seems the Excel ribbon can only be added to using Visual Studio C# or .Net (not Python directly).

Within Python, am I then better off packaging everything using py2exe or similar (i.e. all dependencies including Python itself, xlwings, numpy, etc.) to generate a single .exe file and a single .xlsm which runs VBA (that in turn calls Python)
I don't know anything about modifying the ribbon (what happens in older versions of Excel, before there was a ribbon?), but IronPython runs on .net, and has full access to anything c# does. Since it runs on .net, they don't need python installed on their system, either (I think... you might need to ship an ironpython runtime or something).