NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
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
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
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
Posts: 221
0 Kudos

Re: text file convert to string array

pls post your VI in version 2009.

Member
Posts: 14
0 Kudos

Re: text file convert to string array

I do not have Labview 2009

Knight of NI
Posts: 11,260

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 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome Smiley Wink
Active Participant
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 Smiley Wink

 

Have fun using LabVIEW

Kind regards,

- Bjorn -

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