From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OpenXL_Workbook.vi

Solved!
Go to solution

I need to read an Excel File (.xls) using LabVIEW.  I tried to use the OpenXL_Workbook.vi, but it will not work -- I get an error message (see below).  I have Microsoft Office 2010 installed on my computer. 

 

The vi appears to run fine on different computers with Office 2000 and 2003 versions installed.  Is there anyway to make this vi work with a newer version of Office, such as 2010 -- or am I doing something wrong?  Thanks.

 

openxl_workbook.PNG

0 Kudos
Message 1 of 9
(3,293 Views)

Almost look like you accidentally deleted a wire. Double-click the error to find the invoke node and make sure all inputs are wired.

0 Kudos
Message 2 of 9
(3,271 Views)
Solution
Accepted by topic author gls8754

It could be that the instance of the activeX method node for one version of Excel has another input that the other version of Excel did not have.  So when the VI recompiled for the newer version of Excel, it added this additional input automatically and is now telling you the wire is missing from it.

 

Just click on Show Error and see where it takes you.

0 Kudos
Message 3 of 9
(3,266 Views)

When I click on show error, LabVIEW takes me to the Workbooks invoke node for the activeX method.  I haven't modified the vi any, and it still shows that the bottom parameters that are unwired are optional (dimmed).  Is there any way that I can see more about the exact cause of the error?

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

Hi gls8754,

As error says One of the required terminal is getting wrong input.

Looking at the jpg you posted one of the reason I could think of is the path of the excel.

Secondly what is there in false case? May be that case is getting executed.

Also looking at your jpg this seems a sub vi, so may be input to this vi (reference ) could be wrong one.

 

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 5 of 9
(3,224 Views)

Here is the false case, but as you can see, I cannot even execute the program because of this error.  Therefore, I don't think that this is the problem.  How could I change the path to Excel?  The path in the sub VI is for the Excel workbook filename.  Thanks!

0 Kudos
Message 6 of 9
(3,216 Views)

Can you post your code(in 8.5) ?

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 7 of 9
(3,200 Views)

Ravens Fan is correct 

I have seen this issue with excel, the issue is thedifferent versions of active-x have different inputs to the property nodes.

 

What I do is get the version of excel (Active-X) then dynamically load a VI that operates on the proper property node. The downside is you need to develope the plugins on different computers that have the proper versions of excel.

 

Here is the Get Version.Open Excel.JPG

 

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 8 of 9
(3,191 Views)

Here is what the ActiveX invoke node looks like for Office 2010 compared to previous versions of Office.  There are now additional Local and CorruptLoad parameters listed.  Once I updated to this, everything worked fine on my computers running Office 14.  Thanks for your suggestion...it pointed me in the right direction!

0 Kudos
Message 9 of 9
(3,181 Views)