LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in reading data from Excel sheet to 2D string array (ActiveX & LabView).

I am trying to read data from Excel sheet to 2D string array (ActiveX & LabView). Error -2147352571 is generated (type mismatch) if cell value is "#NULL!", "#N/A" etc. What should I do?
0 Kudos
Message 1 of 3
(3,340 Views)
Hello �

Is the error happening when the cell value is #NULL or #NA only?

Sometimes these errors occur because of an ActiveX object mismatch. The version of the ActiveX object might have changed or been updated since the VI was created. The VI tries to use an earlier, incompatible version of the ActiveX object.

To solve the problem, you need to link automation refnum terminal to the correct ActiveX object. To do so, right-click an automation refnum terminal and choose Select ActiveX Class»Browse from the shortcut menu. From the Type Library pull-down menu, select the latest version of the library you want to use, such as Microsoft Excel Object Library. In the Objects list, select an ActiveX object, and click the OK button. Link ea
ch automation refnum terminal in the VI and its subVIs until the run arrow is not broken. Also, you might have to replace some or all of the Invoke Nodes and Property Nodes for the ActiveX objects.

Also, I came across this Knowledgebase. The error number is slightly different but it is always good to check it out and make sure it is not your case.

Hope this helps.

S Vences
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,340 Views)

You can try using "Excel Find and Replace.vi" to replace all "=NA()" data with "NaN". I had tested it and my Labview was able to retrieve the excel table without issue

 Remove NA data.png

Message 3 of 3
(2,722 Views)