Showing results for 
Search instead for 
Did you mean: 

o read a previously chosen number of rows from the original and transfer them to a different file

Hello, Dear Professional Community


I'm in the beginning stages of learning Labview. Therefore, I apologize in advance if my question seems stupid.
I have a CSV file. I have to read a previously chosen number of rows from it and transfer them to a different file.

After that, I need to start doing the same thing from the n+1 row.

There will be a different number of rows and a different output file every time.

I have to perform this several times until the end of the original file.


Thank you in advance.

Have a good day.



0 Kudos
Message 1 of 5

Obviously, you only need to read the entire file exactly once and then use a loop where you take consecutive subsets and write each to a new file.


What determines the split points? (Data values? User input? Fixed number of rows? etc.). Is the number of sections known? Are all sections the same size?


What have you tried so far? Do you have a typical CSV file and an idea where to split it?

0 Kudos
Message 2 of 5

Dear altbach, thank you for your response.
I will endeavor to provide a more detailed explanation of this.
First of all, it is just one step in the lengthy process.
I have a sniffer log file in CSV format. Currently, I am only working with one of the six columns that are included.
This column includes some data packet, but it is divided into several rows. I know which special characters my data packet starts with. Currently, I am only working with one of the six columns that are included.
From this point, I need to recognize the appropriate rows and column in each row. Then, I need to remove superfluous characters from the beginning and tail of this column value and combine the resulting rows into one. I will attach a typical CSV file. My packet starts with the 'BA AB' substring in column E.


Thank you in advance for your time.

0 Kudos
Message 3 of 5

I don't know your definitions of "superfluous columns" and thus want to remove? Are you talking about the empty columns?

None of your lines start with "BA AB", so your output would be an empty array, right.

0 Kudos
Message 4 of 5

Here is one possibility to find all rows where the fifth column (i.e. column index=4) starts with "4B 01" and omitting the empty rows. I am sure you could easily adapt it to your problem.




0 Kudos
Message 5 of 5