Write columns from csv file to new csv file

I am trying to write the columns from csv file that I have to another csv file. I don’t want to copy all the contents and specific columns only. I know it needs use of !csvLine but my attempt did not work.Does anyone has any suggestions?

So you want to read a CSV file, modify some content and then save it as another CSV file? It can be done with the csvRead/csvWrite commands, but it is rather cumbersome. It is much easier with the new csv array commands:

csvReadArray reads all CSV data at once and stores it in an array.

csvReadArray example: See the DemoCsvSaveArray demo macro that is installed with UI.Vision RPA. It uses csvReadArray, too.

Thank you so much @ulrich. !csvLine and csvSave in a while loop worked.

There is another simple solution in my opinion, with csvread read the database, save the column in variable and then save it in the new csv.

csvReadArray have a big problem start from 0 and this create much confusion in macro management and corrections, row 1 should be indicated with 0 while column 10 should be indicated 9 and this often generates difficulty of understanding.

With csvRead column 1 is COL1 very easy.