The 0.11 versions of xlwings have some major changes to the arrangement of the required files, which will make installation and updating much easier, but for some reason Anaconda is very slow to upload the new versions, and the pdf documentation has some omissions, so here is a summary of procedures for downloading and installing the latest version.
Finding the latest version
The xlwings web site shows the latest version. The source code may be downloaded from the GitHub page, but for easier installation use pip or conda:
pip install xlwings or conda install xlwings
The main conda install is still on version 0.10 however, so for those using the Anaconda Python package, and wanting to stick with conda for updates use:
conda install –c conda–forge xlwings
Install the add-in
- If you have the old xlwings addin installed, find the location and remove it or overwrite it with the new version (see next step). If you installed it via the xlwings command line client, you should be able to do:
xlwings addin remove.
- Close Excel. Run
xlwings addin installfrom a command prompt. Reopen Excel and check if the xlwings Ribbon appears. If not, copy
xlwings.xlam(from your xlwings installation folder under
addin\xlwings.xlammanually into the
XLSTARTfolder. You can find the location of this folder under Options > Trust Center > Trust Center Settings… > Trusted Locations, under the description
Excel default location: User StartUp. Restart Excel and you should see the add-in.
Upgrade existing workbooks¶
- Make a backup of your Excel file
- Open the file and go to the VBA Editor (
- Remove the xlwings VBA module
- Add a reference to the xlwings addin, see Installation
- If you want to use workbook specific settings, add a sheet
xlwings.conf, see Workbook Settings
For more details see the xlwings documentation. For the current version (0.11.4) the pdf documentation has the “Migrate to Version 0.11” and “installation” sections missing. This will be fixed in future versions, but for now use the on-line docs.
Pingback: Excel to Alglib via xlwings | Newton Excel Bach, not (just) an Excel Blog