LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

READING DATA FROM EXCEL

Hi i'd like to read data from excel. i found on the forum this VI (see attached) but it doesn't work for some unwired links.
could some one help please?
 
Regards
 
Tchaou  
Download All
0 Kudos
Message 1 of 4
(2,640 Views)
You're probably using a different version of Excel than the one that was written for the VI. Microsoft keeps changing the ActiveX interface for Office applications with each release, so programs written to use that interface usually break. You didn't say which version you have. I have Office 2003 and LabVIEW 8.2. In my setup the first VI opened just fine. The second VI had broken wires with the "Value" property on the Range object. I changed it to "Value2" and the VI ran just fine as far as I could tell.
Message 2 of 4
(2,623 Views)

From the VBA help file concerning the change from Value to Value2:

The only difference between this property and the Value property is that the Value2 property doesn’t use the Currency and Date data types. You can return values formatted with these data types as floating-point numbers by using the Double data type.

I've run into similar issues several times and although you can usually figure it out with the ActiveX docs...  What a pain in the A$$!Smiley Tongue

I always avoid writing to/from excel and just use a .csv format whenever possible. 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 3 of 4
(2,618 Views)

Yeah I am glad you corrected me, I got mislead by the window ICON when I try to give it a .xls extension.  Just shows I have so much more to learn, thanks.

-Joey

0 Kudos
Message 4 of 4
(2,539 Views)