Showing results for 
Search instead for 
Did you mean: 

extracting particular number of columns from a text file and writing in another



I want to extract  few coulmns from a text file and write it as it is in another text file. I added "space" as delimiter. The vi I created is working on smple text file with equal number of spaces and digits in a column. But the problem which i am facing is due to unequal number of spaces between two columns.


I thought of copying my data in excel and then extract required columns from there but I am not getting how to do that and will it work or not.


I am attaching the vi of my work so far and the text file also. 


Thanks in advance..


Download All
0 Kudos
Message 1 of 3
Simple solution: replace all occurances of duplicate space chars by a single space. After you have done so you convert your string to an array...

(It's a bad idea to use a variable amount of delimiters between values in a delimiter-based text file format anyway!)
Best regards,

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

I tried that also but it is making the data very clumsy and still columns are not correctly separable.

0 Kudos
Message 3 of 3