问题
I own a professional Addin for EXCEL called Valuesoft. It performs several calculations related to equity (stockmarket) data. It is a 160K dll file and works fine from EXCEL including from VBA scripts. However, as soon as an EXCEL file (Workbook) is opened using xlwings from Python the dll disappears (along with the Addins tag on the EXCEL menu).
回答1:
This question or this msdn article seem to explain what's happening and give you a workaround.
Since you are using an xll add-in, adopting msdn's code sample to xlwings should look something like that:
import xlwings as xw
wb = xw.Book('YourWorkbook.xls')
wb.app.api.RegisterXLL(r"C:\path\to\YourAddIn.xll")
来源:https://stackoverflow.com/questions/33125610/xlwings-wipes-out-my-excel-addin