LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent!! a very simple question: How to building a 2D array of strings from a text file?

Hi there Experts !!
 
I want to do a very simple operation in LabVIEW --> read in a text file and put the contents inside a 2D string Array !!!
 
I used the built-in "Read from Text File" VI, and i got all my content inside a string.
 
I now need to process this string and put the contents inside a 2D array.  But I don't know how.
 
here is the what my tab-delimited text file looks like:
 
 
content1    content2    content3    content4  ........  content9
content10  content11  ..........................................  content18
:
:
:
contentN   contentN+1  ......................................... contentN+8
 
 
 
So, I need a 2D string array of a fixed width (column number) of 9, and the height (the row number) depends on the text file.
I have tried alot of things, but all failed......
 
Please help with this ASAP.  Thank you very much !!
 
Warmest Regards,
 
Dave
 
 
0 Kudos
Message 1 of 5
(2,764 Views)
I just modified the Read From Spreadsheet VI to output strings. See the attached VI.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 2 of 5
(2,760 Views)
Thank you very very much Andrew !!!!
 
 
cheers!!
0 Kudos
Message 3 of 5
(2,747 Views)
Use Spreadsheet String to Array (String palette). Wire a 2D string into the type input and your delimiter (the default is a tab) into the Delimiter input.

___________________
Try to take over the world!
0 Kudos
Message 4 of 5
(2,737 Views)

Hmm... for some reason I didn't see the 2 existing replies the first time around... Smiley Sad

Just ignore that last one.


___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,734 Views)