NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
hieu-nguyen@Hotmail.com
Posts: 14
0 Kudos
Accepted Solution

text file convert to string array

I tried to convert text file to string array. But it is not successful.

 text file :

 

 SD, 1,2,3,4

 GD, 3,4,5,6

 

I use spreadsheet string to Array function but ALL characters is become to zero.

 

 my result:

 

  0,1,2,3,4

  0,3,4,5,6

Active Participant
GITA_A
Posts: 221
0 Kudos

Re: text file convert to string array

[ Edited ]

Hi, Its very simple. Try this.

Hope this helps you.

simple.png

 

 

Member
hieu-nguyen@Hotmail.com
Posts: 14
0 Kudos

Re: text file convert to string array

you can see my previous attach fife. I also do this way but  all character convert to  number 0. I do not know why ..... ??

Active Participant
GITA_A
Posts: 221
0 Kudos

Re: text file convert to string array

pls post your VI in version 2009.

Member
hieu-nguyen@Hotmail.com
Posts: 14
0 Kudos

Re: text file convert to string array

I do not have Labview 2009

Proven Zealot
GerdW
Posts: 9,999

Re: text file convert to string array

Hi Hieu,

 

try it that way:

check.png

When you want a string array you have to provide the corresponding constant at the lower left input of "spreadsheet string to array"...

Best regards,
GerdW


CLAD, using 2009SP1 + LV2011SP1 (sometimes even LV2014) on WinXP+Win7+cRIO
Kudos are welcome :smileywink:
Active Participant
ABCPrograms
Posts: 352

Re: text file convert to string array

Hi,

 

indeed the solution of GerdW is the way to do it, except for the fact that the while loop isn't needed in this case :smileywink:

 

Have fun using LabVIEW

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's :smileywink:
LabVIEW 5.1 - LabVIEW 2012