LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange result from read spreadsheet

Hi,

I am trying to plot an intensiti graph from a spread sheet. But the "Read from spreadsheet file.vi" return only zeros, and the number of coloumn is not correct. I tried with format %f and spreadsheet with one decimal place but the same problem exist. Do you have any idea how to correctly read the spreadsheet? ttached here with my vi and the data spreadsheet.

Thank you in advance!
Download All
0 Kudos
Message 1 of 4
(2,725 Views)

A "spreadsheet file" for this purpose is an ASCII table with elements seperated by tabs and rows seperated by linefeeds. It has nothing to do with excel.

Your excel file is in a proprietary microsoft format and thus cannot be read using "read from spreadsheet file". In order to read an xls file, you need to use e.g. activeX. Have a look at the following link:

http://www.ni.com/analysis/excel.htm

Alternatively, you could open your file in excel and then save it e.g. as tab delimited text file before reading it with LabVIEW.

 



Message Edited by altenbach on 01-29-2008 12:25 AM
0 Kudos
Message 2 of 4
(2,719 Views)

Hi Julianti,

      Here's a VI to read an XL spreadsheet.  It makes use of the Automation (AX) tools Altenbach refers to.

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 3 of 4
(2,712 Views)

Thank you so much!! Smiley Very Happy
I can proceed with my vi development now. Thank you!!

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