04-15-2024 06:31 AM
Hello,
I have an application that opens an excel file by using Automation open from the ActiveX palette. It used to work and I havent opened this program in a long time and suddenly today it is not working. When I run it is giving an error element not found in this VI. What is happening? Thank you.
Solved! Go to Solution.
04-15-2024 06:39 AM
Hi govindsankar,
@govindsankar wrote:
It used to work and I havent opened this program in a long time and suddenly today it is not working. When I run it is giving an error element not found in this VI. What is happening?
Any (MSOffice) updates in the last time?
04-15-2024 06:42 AM
no, not really.
04-15-2024 12:19 PM
You may need to "re-select" some or all of the ActiveX items.
Start with the first one, the "Excel application reference" that is wired into the "Open" node. Delete it and re-create it. If you can't find it, then Excel isn't properly installed and you probably need to repair your install or reinstall it. After doing so your program should either work, or at the very least error out at a different location.
If that worked with no problem, then go to any node after that which produces an error, click it, then find the name on the list that is the exact same as its current name, and re-select it. You will probably find that after "re-selection" that the inputs and/or outputs have changed. Depending on the change(s), you may need to add new code to your program to handle them.
04-16-2024 01:28 AM
I did already deleted the excel reference and recreated it and still cant work. BTW this problem is only in my PC. I created an application out of this program and ran the application in a different PC and there it works fine, in my PC both the application and the labview program doesnt work. I was thinking of re installing excel. But the thing is excel is working fine in my PC. I even used excel today morning. I dont know what change might have happened to excel for this program to work like this because this program used to work. I wrote this program in this PC 6 months ago and it worked then. Dont know what happened now.
04-16-2024 01:36 AM
ActiveX works through the registry for finding and instantiating the correct Automation Server DLL. Most likely your Excel registration got funky or corrupted. The application itself will still work but ActiveX Invocation fails. Do try a Repair Install of your Excel and/or Office package.
05-14-2024 06:33 AM
So finally I was able to re-install Excel but still it is not working. I dont have any other idea
05-14-2024 06:59 AM
I had some similar thing happen and needed to reselect the Class in the Create node and then it relinked and broke my code since some functions had changed their calls. After fixing this it worked.
05-14-2024 07:03 AM
I dont understand. Can you elaborate. What I use is Automation Open, to which I wire the Excel Reference. So I am not sure what you mean.
05-14-2024 09:51 AM
I'm not sure if this is your problem but it fixed my Excel VIs that did work but didn't when I tried to run them on a new PC.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KZNSA2&l=en-US