CSV file handling with modification
I need to process a CSV file and do some formatting on certain columns such as padding characters and replace some text within the column. So I think below are the specific tasks to achieve. Line ending should not be altered.
- Read header and identify the colums positions to be modified.
- Read a line and do the modification in the identified column positions.
I already have obtained the column positions correctly from header. How can I modify columns while reading a single line?
Hi and welcome
Maybe something like
QString line= file.readline();
each field is in the list
then put them back.