Reputation: 65
I want to run a python script from VBA using xlwings. I have installed the excel add-in by running
xlwings addin install
from the command prompt, however, the 'xlwings' reference is not showing up in the list of available references in my VBA project. (As a separate but perhaps connected issue, the xlwings add-in in the ribbon is only partly showing: it only shows the 'Active Workbook' and 'Advanced' subcategory.)
I am on Windows 7 Enterprise and Excel 2016
Upvotes: 1
Views: 3050
Reputation: 26
I came across the same problem. However, there was a work around. Since ultimately you want the work without alerting "no xlwings moduldes", you can manually import xlwings and xlwings_udfs modules into your current workbook then it will work. Those two modules should be available on any example spreadsheet from xlwings official website.
Upvotes: 1
Reputation: 163
Try removing the xlwings module from the VBA project(must be empty to remove...you should only have config settings there anyways) and installing the add-in via command line(xlwings addin install). Now when you try to edit your references, first confirm the xlwings project is visible in the VBA project directory on the left, and then select your current project and try to add a reference. Xlwings should now be in that list. I managed to resolve several issues by upgrading to the latest xlwings version - the older version Anaconda came with seemed to be missing a fair amount of functionality, mainly concerning the add-in(which as far as I can tell is superior to the module.)
Upvotes: 0
Reputation: 1
I just had the same issue. xlwings seems to be in the list, if you have "VBAProject (Book1)" selected before going to Tools->References. You have to make sure that you do not have the "xlwings (xlwings.xlam)" module selected, before selecting Tools-> References.
Upvotes: 0