From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text file convert to string array

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(6,768 Views)

Hi, Its very simple. Try this.

Hope this helps you.

simple.png

 

 

0 Kudos
Message 2 of 7
(6,753 Views)

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

0 Kudos
Message 3 of 7
(6,741 Views)

pls post your VI in version 2009.

0 Kudos
Message 4 of 7
(6,737 Views)

I do not have Labview 2009

0 Kudos
Message 5 of 7
(6,723 Views)
Solution
Accepted by topic author hieu-nguyen@Hotmail.com

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


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(6,712 Views)

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 😉

 

Have fun using LabVIEW

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
Message 7 of 7
(6,704 Views)