LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access excel using activeX object in LabVIEW

Hello,

govindsankar_0-1713180466432.png

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. 

 

0 Kudos
Message 1 of 6
(188 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(179 Views)

no, not really. 

 
0 Kudos
Message 3 of 6
(175 Views)

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.

0 Kudos
Message 4 of 6
(114 Views)

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. 

0 Kudos
Message 5 of 6
(82 Views)

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.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(78 Views)