how to extract certain lines from a csv file
Show older comments
Hi everyone, I really need a hand. I have a csv file containing many lines which cannot be opened in excel. I would like to create a script that allows me to keep the first line and then go and read the file line by line.
Now each line is made up of several characters, at a certain point in the line there is the element that identifies me what that line refers to (eg: UPRE_S14SPLO_901), in total there are 21 of these elements. I would like the mi script to read each line and create 21 csv files corresponding to the elements that interest me where all the lines referring to that element are contained.
Does anyone know how to do? I am attaching an example of the file to make you understand how it is structured.
Accepted Answer
More Answers (0)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!