Loading a ADD-in in excel using Python issue (Bid <30$)
$10-30 USD
Closed
Posted almost 6 years ago
$10-30 USD
Paid on delivery
I am trying to run a macro in excel using python.
The issue is that the macro needs a add-in (.xla file) which needs to be loaded before the macro runs.
This add-in does not get loaded everytime, when the python code runs and tries to run the macro.
So as a solution, I need to unload and load the addin using python, as we do in excel to load the addin
I am trying to do this
import [login to view URL]
xl = [login to view URL]('[login to view URL]')
[login to view URL] = True
addin_path="C:\\Path\\[login to view URL]"
xl.DisplayAlerts=False
[login to view URL]('C:\\Path\\[login to view URL]')
#Unloading and loading the add-in
[login to view URL](addin_path).Installed=False
[login to view URL](addin_path).Installed=True
#Running the macro "Macro_run" in the Excel file
xl.DisplayAlerts=False
[login to view URL](Filename="C:\\Users\\[login to view URL]")
[login to view URL]("Macro_file!Module1.Macro_run")
xl.DisplayAlerts=False
[login to view URL]()
[login to view URL]() # Comment this out if your excel script closes
del xl
But it gives me this error
"Microsoft Excel', u'Add method of AddIns class failed'
in this line:
[login to view URL](addin_path).Installed=False
How to rectify this
Hi we could do this for you in a day. Our team consists of individuals from diversified fields and each of us having more than 5 years of experience in python. For more details check out our profile.
Relevant Skills and Experience
Python, excel , vba