LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read the column format date from excel and convert it to 1D array in labview

hi, guys, got a problem.#

with CAN analyser i saved all the date from the maschine in excel file(csv)( Attention: the date was save as only in one column)column_2012-12-26_23-26-42.jpg.

 

Now i need the date to be read synchronized by LABVIEW. So I designed a small program.(Principle of the program: use spreadsheet string to Array function to read the excel date, then use Array Size Function to detect the size of the 1D array, the size minus one is the index of the last value of the date, at last by using Index Array Function to get the last date within a sample rate time ) as you can see below:

Read_last_durchmesser.jpgpath.jpg

 

 

The problem is,  the Spreadsheet String to Array Function can only read the date from excel in row format. This means, Labview can only read A1, with the value  23. and then it readed B1(I tried once to write a value in B1 and labview can really read it), but not A2, A3,A4..... Of course it shows nothing from the second Read as you can see below:

 

Probe Watch Window_2012-12-26_19-52-30.jpg

 

I tried all the functions in Array but still cannot find one to solve it. 

Following is the file, if you want

 

 

0 Kudos
Message 1 of 9
(4,338 Views)

Why don't you use Read From Spreadsheet File?

 

(I'm assuming your real file is actually a .csv and not an .xlsx like you posted.)

 

It gives you a 2-D array.  Then you can use index Array to get the 1st column.

0 Kudos
Message 2 of 9
(4,326 Views)

thx. i tried your method but still didnt work

0 Kudos
Message 3 of 9
(4,323 Views)

Post what you tried.  It worked for me.

0 Kudos
Message 4 of 9
(4,319 Views)

man can not upload csv file, i think it is not difficult for u to generate one by yourself. Thx

Spoiler
Spoiler

 

0 Kudos
Message 6 of 9
(4,310 Views)

Read_last_durchmesser_BD.png

0 Kudos
Message 7 of 9
(4,298 Views)

thank u so much

0 Kudos
Message 8 of 9
(4,285 Views)

No need for a loop.  The file shouldn't be reread every 100 milliseconds,

0 Kudos
Message 9 of 9
(4,281 Views)