The PyXLL command line tool automates tasks around installing, updating and switching between different versions of PyXLL.
In order to use the PyXLL command line tool you first need to install it using pip:
>> pip install pyxll
If you are using a conda or virtual env you should activate the environment you want to use first.
To get the latest version of the PyXLL command line too you should update the package using pip:
>> pip install --upgrade pyxll
The PyXLL wheel file is also included in the PyXLL download and may be installed from there.
After installing, the following commands are available:
The install command installs the PyXLL Excel add-in into Excel. It is necessary to either perform this step or to install PyXLL manually before the PyXLL Excel add-in can be used.
>> pyxll install [OPTIONS] [PATH]
Options: |
|
---|---|
|
Version of PyXLL to install. |
|
Output more information when running the command. |
|
Install the PyXLL add-in as the first add-in to be loaded. [2] |
Can be run with or without PATH.
If PATH is not specified then either the latest version of PyXLL or the version specified will be downloaded. You will be prompted for some details in order to complete the download.
If PATH is specified it can be a zip file downloaded from the download page, or a folder containing the extracted downloaded zip file.
If you already have PyXLL installed you will be warned but may continue.
Any existing files that will be over-written will be backed up.
You will be given the choice to change the location of the installation, allowing you to maintain multiple copies of PyXLL.
If installing in the same folder as your existing installation, your existing config file will be backed up and a new one will be created with the default configuration.
PyXLL will be configured automatically to use the active Python environment.
Further configuration can be performed by editing the pyxll.cfg file included in the installation or by using the pyxll configure command.
The configure command opens the pyxll.cfg configuration file for the currently active PyXLL addin.
>> pyxll configure [OPTIONS]
Options: |
|
---|---|
|
Output more information when running the command. |
The default editor for the file type .cfg will be used to open the config file.
PyXLL can have been installed using pyxll install or manually.
The status command checks the status of the active PyXLL installation and reports information about it.
>> pyxll status [OPTIONS]
Options: |
|
---|---|
|
Output more information when running the command. |
If there are any issues with your current PyXLL installation this command may help identify what the problem is.
The update command updates your active PyXLL installation to the latest version of PyXLL.
>> pyxll update [OPTIONS] [PATH]
Options: |
|
---|---|
|
Version of PyXLL to update to. |
|
For the update, even if the installed version is newer. |
|
Output more information when running the command. |
Your existing pyxll.cfg file will not be modified.
The previous pyxll.xll file will be backed up.
Can be run with or without PATH.
If PATH is not specified then either the latest version of PyXLL or the version specified will be downloaded. You will be prompted for some details in order to complete the download.
If PATH is specified it can be a zip file downloaded from the download page, or a folder containing the extracted downloaded zip file.
If you want to try out a new version of PyXLL before upgrading use the pyxll install command and specify a different folder to install it to. You can use the pyxll activate command to switch between installs easily.
The activate command switches between different PyXLL installations quickly.
>> pyxll activate [OPTIONS] [PATH]
Options: |
|
---|---|
|
Output more information when running the command. |
|
Don’t prompt the user for any input. [1] |
|
Install the PyXLL add-in as the first add-in to be loaded. [2] |
You can maintain multiple versions of PyXLL at the same time by installing PyXLL into different folders.
This command selects which PyXLL add-in is active in Excel and does not change any files or configuration.
Can be run with or without PATH.
If PATH is not specified then it will look for pyxll.xll in the current working directory and activate that, or prompt for a path if pyxll.xll is not found.
If PATH is specified it should be a folder containing the PyXLL add-in to be activated.
Installs the PyXLL certificate into the ‘Trusted Publishers’ certificate store.
>> pyxll install-certificate [OPTIONS]
Options: |
|
---|---|
|
Output more information when running the command. |
Installing the certificate is done as part of installing PyXLL but can also be done using this command (for example, if installing the certificate failed during the initial install).
If the certificate can’t be installed then Excel may prompt the user that the add-in is unsafe or prevent it from loading, depending on Excel’s Trust Center Settings.
The uninstall command uninstalls the PyXLL Add-In from Excel.
>> pyxll uninstall
Options: |
|
---|---|
|
Uninstall without any confirmation. |
|
Log what would happen without actually uninstalling. |
|
Output more information when running the command. |
This command only uninstalls the PyXLL add-in from Excel.
No files will be deleted.
To reinstall the same PyXLL add-in run pyxll activate.
Footnotes