LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read data with spreadsheet in different formats

Hi all,

 

I have to read these data table using the VI Read From Spreadsheet File of .dat file:

 

 

377.88 6.326826E+03 2.024894E+03 253.794 
377.89 6.328341E+03 2.026409E+03 253.984 
377.90 6.329855E+03 2.027923E+03 254.173 
377.91 6.331370E+03 2.029438E+03 254.363

 

377.88 6.326826E+03 2.024894E+03 253.794

377.89 6.328341E+03 2.026409E+03 253.984 

377.90 6.329855E+03 2.027923E+03 254.173 

377.91 6.331370E+03 2.029438E+03 254.363

 

Note that we have two differents formats: float and scientific notation, then i tried with %#g for example, but i can' t read, only i read the first colum.

 

Could u help me plz?

 

César

0 Kudos
Message 1 of 4
(2,668 Views)

Can you post the part of your program that is reading this, either actual code (best) or an image (in .png or .jpg, NOT .bmp)

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



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

Not sure, but it may be the delimiters you are using in your file. Can you attach part of one of your data files? What are you using as a "delimiter" between the values? If you copy the text and paste in to a string control or indicator you can then right click on it and select "\" Codes Display to see what characters are used. Also the end of line character needs to be examined. The "Read from spreadsheet" expects carriage return, newline displayed as \r\n in the above way. It (the read from spreadsheet vi) does have a terminal that allows you to specify the EOL as well as the "delimiter". It expects tabs "\t" so if you have spaces "\s" it won't differentiate between groups on a line, which would give you only the first column.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,658 Views)

I attached the frontal and block of VI, Well, a simple solution is resaved the file again, but I want to ensure that my program will work for any event: files (.dat , .txt ,csv).

 

In the imagen you can see the configuration of VI.

 

Bets

 

Cesar

Download All
0 Kudos
Message 4 of 4
(2,650 Views)