xlwings wipes out my EXCEL addin

倖福魔咒の 提交于 2019-12-24 14:34:18

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!