Error -2147352571 When Reading Excel Data in LabVIEW Using ActiveX

Updated Sep 18, 2018

Reported In

Software

  • LabVIEW

Issue Details

I am using LabVIEW and trying to read data from an Excel sheet using ActiveX. When reading cells which include an error such as #DIV/0, I get an error -2147352571 from Variant To Data Function in LabVIEW. How can I fix this?

Solution

This error can be caused by a data type mismatch. Please try to change the data type that you connect to the type terminal of the Variant To Data Function.
An example program is attached below. If you try to convert variant data read from Excel cells which include error #DIV/0 into a string array, the error -2147352571 will occur. But if you try to convert the variant data into a numeric array, you can avoid the error.

Attachments