ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel ActiveX control

Solved!
Go to solution

I am trying to run an example code and I receive the following error:

 

"Error -2147319779 occurred at Library not registered.
in Excel - Write Table.vi"

 

LabVIEW Example Code: C:\Program Files (x86)\National Instruments\LabVIEW 2018\examples\Connectivity\Excel\Excel - Write Table.vi

 

This error is thrown at the Automation Open function. What libraries do I need to register to get ActiveX references working correctly?

 

LabVIEW 2018 : 32-Bit

Microsoft Office 2010: 32-Bit

Windows 7: 64-Bit

0 Kudos
Message 1 of 6
(8,397 Views)

Well, I generally use the Report Generation Toolkit (which you might not have), so didn't expect much from an ActiveX Example.  I ran the same example (Excel - Write Table) using LabVIEW 2018 (32-bit) on Windows 10 x64 and Excel 2013 (64-bit).  I don't know what element makes the difference, but for me, the example worked.

 

Bob Schor

0 Kudos
Message 2 of 6
(8,366 Views)

Thanks, but I need to use the Automation Open function. Any other advice?

0 Kudos
Message 3 of 6
(8,325 Views)

I assume you have checked the obvious... excel is installed?

I also assume you have followed the instructions in the block diagram...

 

image.png

 

The example also works for me on LabVIEW 2016 (32-bit) on Windows 7 x64 and Excel 2013 (64-bit)

Good luck.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 4 of 6
(8,314 Views)

Hmm.  I looked at the last two Posts, and thought about this again.  I was first curious about the comment that the Original Poster needed to use the Example and the Automation Open function, so I thought "Well, maybe he (or she) doesn't have the Report Generation Toolkit, so has to use ActiveX directly."  I verified that the Example works for me, but then decided to understand Frozen's note that references finding the correct ActiveX class.  So I tried to do that.  I right-clicked on the ActiveX refnum, chose Select ActiveX Class, and tried to find the Excel._Application refnum.  I couldn't -- there are hundreds of Type Libraries, each with numerous entries, but nothing (obvious) under Excel, Office, LabVIEW, Microsoft, ...  I was able to find an Excel._Application, but I got it by "cheating" -- I used the function in the Report Generation Toolkit that returns Excel ActiveX references, including _Application.

 

Bob Schor

0 Kudos
Message 5 of 6
(8,305 Views)
Solution
Accepted by topic author Albyeh2

It looks like Microsoft Excel 8.0 Object Library was missing from the 2010 Microsoft Install. Re-installation of 2010 did not solve the issue, so I had Microsoft Office 2013 installed which seems to have fixed the problem. There must be an issue with the 2010 Microsoft Office Package that is being installed.

0 Kudos
Message 6 of 6
(8,286 Views)