Distribute xlwings macro without xlwings installation?

Viewed 2368

I'm having trouble finding an answer to this - I'm writing some simple VBA with the goal that my colleagues can install it as an add in or custom tab. Coming from Python I would, of course, prefer to work with xlwings or pyxll, but as I understood it in order to call any python you would have to install xlwings on every computer?
The ideal scenario would be that I could develop excel add ins with xlwings or pyxll and export it as if it were a normal excel add in, so that my colleagues can install it easily. Unfortunately, I can't install all the required python modules on every target computer.
is this possible or just wishful thinking?

5 Answers

I agrre with you, the best solution is everyone has anaconda installed in the computer, the best thing you don not need administrator privileges to install anaconda, just use the option "just me".

There are various good options for distributing PyXLL based add-ins, including bundling Python and PyXLL into a single installer.

See https://www.pyxll.com/docs/userguide/distribution.html for some details.

Here's a link to what you need to create an MSI for a PyXLL add-in that will include the Python runtime and all of your Python code https://github.com/pyxll/pyxll-installer.

For deploying inside an organization using a startup script is often the best way as it enables you to easily push out updates without having to reinstall anything (https://www.pyxll.com/docs/userguide/distribution.html#using-a-startup-script-to-install-and-update-python-code).

If you need any help with this get in touch with PyXLL support. This is a very common use-case where you want to deploy to non-Python users internally and so they have lots of experience with this.

I face this situation daily at work. Your best option would be to convert your scripts to executables with pyinstaller & have your coworkers store them at X location (example: Desktop/ExcelScripts), then I'd recommend creating a button to run X script at that location. Cheers

Related