LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RGT Excel Get ActiveX References (LV2021)

Solved!
Go to solution

Has anyone else experienced the RGT Get ActiveX Refernces.vi (Excel Specific) returning an Unknown Class from each of the output nodes?

 

I am using the RGT to populate an Excel Workbook and am attempting to fix a bug in my program. I need to access the ActiveX classes for the Excel Workbook but when I try, I get that it is an Unknown Class. Using Version 21.0.1f2 (LV2021).

 

Eric1977_0-1671635140073.png

 

0 Kudos
Message 1 of 23
(2,199 Views)

Is Excel installed on your computer?

Can you create an Automation refnum, and select Excel?

 

George Zou
0 Kudos
Message 2 of 23
(2,192 Views)

Yes, Excel is installed on my PC

 

When I tried to select Excel, I couldn't find it and, when I went to choose the reference, I don't see Microsoft Excel 16.0 Object Library like I can in Access (I see it there).

 

Eric1977_0-1671636615295.png 

Eric1977_1-1671636675599.png

 

 

0 Kudos
Message 3 of 23
(2,181 Views)

Because you included no code (no files with the extension .vi that we could inspect and even try to run), I'm not sure where your problem lies -- is it in LabVIEW, in Excel, possibly a bad installation of something?

 

So I opened some code that I (thought) ran OK.  I've mostly been using LabVIEW 2019, but I do have LabVIEW 2021 installed on two machines.  On the first, I discovered that while I had the RGT, there were no "Excel Specific" functions (nor the subPalette), although Excel is installed and working with the RGT.  So I opened the other machine, and everything looks fine.  Looks like I have something amiss in my 2021 RGT installation on the first machine.

 

Do attach the failing code -- I'll try it out on the "working" PC (and will try to get the first PC's RGT installation fixed).

 

Bob Schor

0 Kudos
Message 4 of 23
(2,180 Views)

You might need to re-register Excel on your computer.

 

George Zou
0 Kudos
Message 5 of 23
(2,178 Views)

Sorry Bob. I went against my own advice. Attach VIs. 

 

It basically starts and ends here with the Get ActiveX References. When I try to add a property node, it appears blank. When I right-click and tCreate, I should see some options to create either property or invoke nodes. Those are grayed out.

0 Kudos
Message 6 of 23
(2,172 Views)

I have some new information. If I browse to the Excel executable from the Type Library dialog box, I can access all the Properties and Methods. I am wondering of an Office update was released by my I.T. department and LabVIEW is looking for a refence to it and its moved.

 

Anyone know where that information is stored?

 

Eric1977_0-1671640619023.png

 

0 Kudos
Message 7 of 23
(2,150 Views)

Thank you for the attachment.  When I open it in my "working" PC that has the RGT for 2021 installed, I get a broken arrow (same as you).  While playing around, the broken arrow disappeared, becoming an "intact" arrow!  What did I do?  Took me about 5 minutes before I did the "least obvious thing" -- I deleted the Property node, and Presto, Change-o, no broken arrow.  I didn't explore any more, but see if this works for you!

 

Bob Schor

0 Kudos
Message 8 of 23
(2,147 Views)
Solution
Accepted by topic author Eric1977

Bob - maybe I misspoke or misled.

 

My problem is when I try to select any of the classes within the Get ActiveX References.vi, they come back as an Unknown Class and are grayed out. I was expecting to see properties and methods available as I have in the past. The behavior you have seen with my example VI is what I get when I try and attach a property node to any of the Excel classes.

 

BUT...if I try and add a reference to Excel via the Automation Ref, I don't see it unless I explicitly navigate to the Excel executable. 

 

I shouldn't have to do this, but something is broken somewhere.

 

Eric1977_0-1671642588702.png

 

Message 9 of 23
(2,138 Views)

Eric, you neither misspoke nor misled -- I misunderstood.  While I know that the RGT "Wire" is a Class Wire, I've never directly treated it as a Class, and was satisfied to simply let the RGT functions "do their magic" without looking too closely at what was going on "behind the scenes".  So far, I've been able to do what needs to be done just using the RGT and occasionally (like when answering a Forum Post that involved creating an Excel Macro) learning more-than-I-knew-before about more advanced Excel functions.

 

It sounds (to me) that you might be more experienced in Things Excel than I, as you are dealing with Classes (and, I presume, Objects), so I might have some things to learn from you.  Would you be willing to explain what you hope to do (which seems to involve "extending" the RGT, perhaps in ways that would be useful for LabVIEW users to appreciate and incorporate)?

 

I do have to thank you for making me realize that I'd created (on my personal Laptop, so I'm "personally" offended that I messed this up) a LabVIEW installation that was missing the RGT.  Going the "simple route" of firing up NIPM and saying "Add this missing package" didn't work, as the RGT is an "Add-on", and doesn't appear in the "to be installed" list unless you've chosen to make a change on the first page of basic components and drivers.  So I went looking, and did a Web search for "Download LabVIEW Report Generation Toolkit", which got a hit!  I'm now able to run my own code.  A Kudo to you!

 

Bob Schor

0 Kudos
Message 10 of 23
(2,132 Views)