Showing results for 
Search instead for 
Did you mean: 

Create a .txt document from two related arrays


I try to create a .txt document similar to a "Log". Where starting from two arrays, one of values and the other names of these values. The problem is that when the document is created instead of leaving me for each Name of value x (1,2,3 ...) a column. A single column is created and the name of the value is changed. How could I create a column for each Name of value '' x ''? And that in each while loop it is updated by rows of each value and not everything in the same column.
The document created can be .txt or excel or csv the type is not important. In my example I have tried it with .txt
PS: Attached the VI that simulates the example explained, a .txt generated with it and a .txt as I would like it to be.

I hope I have explained and thanks in advance.

Download All
0 Kudos
Message 1 of 2

For each row you are concatenating the data name and data value together into a single string which put into a single element of an array.  The elements of that array are the columns of data, and you've assembled a single column of data.


Just put the values into a different element of the array.


"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 2