LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

excel format from a TXT file

Solved!
Go to solution

hi all

 

i ve been trying to read a TXT file into labview, the thing is that i have not been able to give format as excel file, i want to use a 2D array for all the data that comes on the txt file

 

i used the "read from spread sheet" function, the data is read only on one column.then i used the read from text file function, and everything comes on one string indicator

 

here is the txt file i want to excel format.

 

hope you can help me 

thanks

0 Kudos
Message 1 of 5
(2,547 Views)

Look at the structure of the text file.  The data is separated by spaces.  The header looks like it's separated by tabs, but it's not.  The column headers are actually separated by several spaces.

 

Deal with that and you will be just fine.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(2,539 Views)

Please post the code that you've tried.

 

The problem you're having is that the text is delimited with spaces not tabs.  The first row has several spaces in between each entry but the rest of the rows have only one space between entries.  If you use a space as a delimiter the you'll end up with too many columns and the column headings will be misaligned.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 3 of 5
(2,534 Views)
Solution
Accepted by topic author Tokyghy

Your file has data separated by space and lines separated by line feeds. The complication is that the header line has multiple spaces between data elements.

 

There are many ways to decode such a string. Here is one.  This is not optimized but is intended to show how several of the string functions can be combined to parse your data.

 

Lynn

Message 4 of 5
(2,528 Views)

thanks, this looks fine, now i can manage the data easily

 

thanks all for your support

0 Kudos
Message 5 of 5
(2,470 Views)