LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error occured at Class not registered... Because Excel is not installed?

Solved!
Go to solution

I received the following error while trying to run an application built with LV 7.1:

 

Error -2147221164 occured at Class not registered in Open_Excel.vi > Report_generation_excel_Tbeta WITH new layout.vi > Mirror_Cycling_Main tbeta-2.vi

 

Could this be because Excel is not yet installed on the computer?  Will there be a problem if Excel is installed after the 7.1 Runtime Engine and LabVIEW drivers?

 

Also, should I stay away from installing higher versions of Excel than what was originally used?

 

Would it be possible to create a VI like this with the base version of 8.2?  I'm not certain what some of the controls on the front panel are and 7.1 does not give me additional information in the help dialog- if someone could give me the names of the various components circled in red in the attached JPG I would appreciate it. 

 

Thanks,

 

Dave

 

 

 

0 Kudos
Message 1 of 9
(4,725 Views)
Solution
Accepted by topic author davey31415

Yes, if you do not have Excel installed then you will get that error since the code is trying to access the Excel ActiveX Server. No Excel, no Excel ActiveX Server, no code worky.

 

It should not matter if you install Excel after the LV Runtime.

 

Yes, it will matter if you install newer version of Excel since Microsoft changes the ActiveX interface with each new version of Excel. Thus, what works for one version of Excel may not work with another.

 

Those controls are Automation Refnum controls. From the controls palette Refnum -> Automation Refnum. These should be available in the base version of LabVIEW.

Message 2 of 9
(4,716 Views)

Thank you smercurio_fc!

 

I think I'll look for ActiveX examples after I get this app up and running.

 

 

0 Kudos
Message 3 of 9
(4,712 Views)

Hello,

 

I'm having the same error. I have reinstalled MS Excel and it's still giving me the error. My VI uses the ActiveX "Automation Open Function" and that's where the error first appears. How do I fix this?

 

Thank you,

Max

0 Kudos
Message 4 of 9
(4,315 Views)
Which class are you trying to instantiate? What version of Excel do you have? What version of LabVIEW? Can you show us your code?
0 Kudos
Message 5 of 9
(4,309 Views)

I'm using excel 2003 with labview 2009 v9.0f2. I have attached the VI here. Basically, Im just using the"excel get all data.vi" to read an excel file to create an array and that's where the error occurs.

 

Max

Message Edited by MaxXx on 12-07-2009 10:33 AM
Download All
0 Kudos
Message 6 of 9
(4,304 Views)
I don't have the f2 patch, but I tried in on vanilla LV 2009 and the VI worked just fine with Excel 2003. Have you tried rebooting your machine? Are you running Vista, by any chance?
0 Kudos
Message 7 of 9
(4,253 Views)

I am running windows XP and I did reboot my computer after reinstalling Excel. I dont know why it's not running on my home computer, I have the same setup in my lab and it worked fine. Maybe there are some services that need to be enabled? or some patches/addons I need to install (for excel or labview)? Thank you for your help.

 

Max

Message Edited by MaxXx on 12-07-2009 01:06 PM
0 Kudos
Message 8 of 9
(4,247 Views)
There aren't any additional services required. If the ActiveX class is properly registered then it should be seen. Just out of curiosity, do the examples that deal with Excel that ship with LabVIEW work for you? If they do, you may need to reselect the class within your VI. If they don't, you have a deeper problem. You should try to eliminate the possibility of a corrupt Excel registration by trying to access the Excel automation from a program other than LabVIEW. I would suggest searching the internet as there are lots of examples on using Excel automation from programming environments.
0 Kudos
Message 9 of 9
(4,229 Views)