I have two repositories in my file structure R1 and R2. Repository 1 (R1) is in my PYTHONPATH.
I'm trying out xlwings which works wonderfully when I run from Python to change an Excel file. However, I'm having issues with running scripts from Repository 2 (R2).
When I put the path to R2 in PYTHONPATH in the xlwings addin it seems to be appending R2 onto the original PYTHONPATH and since R1 is first it seems to be defaulting to R1 when importing.
Is there a way to (locally) overwrite the PYTHONPATH just for that xlwings instance well keeping R1 in my system PYTHONPATH?
You can use a config file in the directory of the workbook or a config sheet in the workbook itself, see: http://docs.xlwings.org/en/stable/addin.html#global-config-ribbon-config-file These will override the settings from the global ribbon config.