All PyXLL licenses are valid for the latest version of PyXLL, so if you're using an old version then there's no reason not to upgrade!
Before upgrading you will want to check the changelog to see what's changed between your current version and the latest version. Moving between minor versions shouldn't cause any problems as backwards compatibility is maintained between these versions. If upgrading from a previous major version (eg 3 to 4) then take a look at what's new first, which also has advice on any breaking changes (which even between major versions are minimal).
When upgrading to a new version of PyXLL, take a look at the sample pyxll.cfg included in the download. You should compare this to your existing pyxll.cfg file, as there may be new options in the newer file that could be useful to you. Also take a look at the examples, as any new features will also have new examples to demonstrate how to use those features that you may not have seen previously.
The latest PyXLL release can be downloaded from https://www.pyxll.com/download.html.
To upgrade your PyXLL add-in, you can either:
- Use the PyXLL Command Line Tool
- Replace the existing pyxll.xll file
- Install the new pyxll.xll file from another location
Regardless of which of the above options you use, you will also want to install the latest .whl file included in the PyXLL zip file using "pip install --upgrade pyxll". (This is not strictly necessary as the whl file is only needed for the command line tool and so that the pyxll module can be imported by code not running in Excel, such as unit tests.)
Using the Command Line Tool
Once you've updated your pyxll Python package by running "pip install --upgrade pyxll" you can update your installed PyXLL add-in by running "pyxll update". If you have already downloaded the version of PyXLL you want to update to you can run "pyxll update {pyxll-download-zipfile}".
Updating PyXLL this way will not overwrite any of your existing config or Python code.
If you want to try out a new version of PyXLL before updating (which we recommend) you can use the "pyxll install" command to install the latest PyXLL version. Make sure that you choose a different folder from where you currently have PyXLL installed. When you want to switch back to your previous version, use "pyxll activate".
Upgrading Manually
Replacing the existing file is arguably the easiest way to upgrade PyXLL manually. Simply close Excel, rename your existing pyxll.xll file (eg to pyxll.v3.x.xll) and copy the new pyxll.xll in place of the old one. Now restart Excel and it will be using the latest version! Don't forget to apply any config changes you've identified to your pyxll.cfg file.
To install the new version of PyXLL from another location, you first need to un-install the old version. To do this, in Excel go to Options -> Add-Ins -> Manage Excel Add-Ins. Unselect the PyXLL add-in, and completely close Excel. Check there are no other open Excel sessions as Excel has the strange behaviour that it remembers the add-ins from the last open Excel instance. If you have another Excel instance running with PyXLL loaded, and you close that after removing PyXLL from another instance, Excel will still remember it which can be very confusing! If in doubt, close all Excel sessions, open one new one, remove the add-in, and then close that session. Now you have uninstalled PyXLL, you can install the new one from the new location by starting a new Excel session and adding it via Options -> Add-Ins -> Manage Excel Add-Ins. If upgrading PyXLL this way you will need to copy your existing settings from your old pyxll.cfg file to the new one.
Tip: If you are ever unsure about where Excel is loading PyXLL from, go to Add-Ins -> PyXLL -> About. For older versions of PyXLL that don't show this information in the about screen, go to Options -> Add-Ins and you will be able to see the path of the add-in there.
Do I need to update the "pyxll" Python wheel/package?
It is not strictly necessary to update the pyxll Python package when updating the Excel add-in. All of the code required for the add-in is contained within the add-in itself, and so only the pyxll.xll file needs to be updated.
The pyxll Python package contains the command line tools for managing the add-in as well as some stubs or dummy functions so that you can import pyxll from outside of Excel. Being able to import pyxll from outside of Excel is useful for testing, and for other situations where you need to import your code that uses pyxll, but without the functionality of the PyXLL add-in and so this module is provided for that purpose. When your code is running in Excel the pyxll.xll add-in provides the complete implementation of the pyxll module and does not depend on having the pyxll wheel file installed.
You can upgrade the package by running "pip install --upgrade pyxll". If upgrading manually, the wheel file is contained in the download zip file.