LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving comma separated string to file in two column.

I have a comma saperated string how can I save it in a file in form of two column.

 

e.g.:

"a,1,b,2,c,3,d,4,e,5" suppose this is my string than I want to save it in an ASCII file as:

 

Name               Age

a                        1

b                         2

c                         3

d                         4

e                         5

0 Kudos
Message 1 of 3
(2,623 Views)

Hi vaibhavinegi,

 

convert your string to a 1D array of strings, then decimate to two arrays, then BuildArray to form a 2D array (or use ReshapeArray instead of Decimate and BuildArray). Then save your array as needed…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,617 Views)

Something like this should work for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,602 Views)