LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from spreadsheet file

Hi! I am a beginner labview user and I have a problem reading data from a
..xls file. I have written in columns the data that i want to present in a
waveform graph through labview. I give the path to the Read From Spreadsheet
File tool and i connect a true constant in the "transpose" terminal. The Run
button shows me no error but all I get in my waveform graph is a x-axis
line. Could someone help me? Thanx
0 Kudos
Message 1 of 4
(3,318 Views)
You say that you want to read data from a .xls file. You use Read From Spreadsheet File to get the data into LV.

You have mixed some things. A .xls file is NOT a spreadsheet file. It is a file which could be read by MS Excel and some other tools which have import filters for this file. Read from Spreadsheet File is not such a filter.

A spreadsheet file in the context of LV is a text file where the cells of a row are separeted by a tab and the rows are separated by a end of line.

A save thing is use Active-X automation to communicate with MS Excel. Let it load the file and read out the cells. The are examples in LV help and in the dev zone. You must have installed and licenced MS Ecxel on your target machine. Maybe someone has written such a fil
ter for LV but I don't know it.

The other way will only work if you use US local settings and the data is in one worksheet. Save the file with the extention .txt. So Excel will generate a text file of the correct format. Excel will use the regional settings of your machine. You can read in this file with Read From Spreadsheet File. Unfortunatly this will use fixed settings which are the same as for US regional settings.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 4
(3,318 Views)
Hi,

the Read From Spreadsheet file function allows to read from a numeric text file where data are organized in rows and columns (spreadsheet format).This is different than XLS files which are not text files.
If you want to read from an XLS file follow my previous post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=506500000005000000D3C40000&HTHREAD=000050387&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0

Good luck,

Alberto
Message 3 of 4
(3,318 Views)
thanks a lot
"alberto" wrote in message
news:50650000000500000019CA0000-1042324653000@exchange.ni.com...
> Hi,
>
> the Read From Spreadsheet file function allows to read from a numeric
> text file where data are organized in rows and columns (spreadsheet
> format).This is different than XLS files which are not text files.
> If you want to read from an XLS file follow my previous post:
>
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=5
06500000005000000D3C40000&HTHREAD=000050387&UCATEGORY_0=_49_%24_6_&UCATEGORY
_S=0
>
> Good luck,
>
> Alberto
0 Kudos
Message 4 of 4
(3,318 Views)