Remove new lines in a csv - Help

Hello guys I have a CSV input as attached.
Problem is there are some lines where there is a new line added and should be removed.
So that first column is always ID.
Can this be done with UiPath studio activities?
Any idea please.
Thank you so much (125.3 KB)

Maybe some Trim activity?

@hurmet.noka Kindly provide more information, about what should remove. If possible share CSV file by zip it and expected output.

Hi @hurmet.noka ,

We see that you have provided us with an xlsx file, where as the Image shows us a Csv Text file.

If unable to send a .csv file, try to compress (zip) and send the file here.

We would like to check the Input data at hand.

CSV is attached.
As you can see one column entry is stretching on multiple rows. I dont want that.
Or when i read csv to datatable and write datatable to excel this will not appear?
Thank you

Sorry I updated the file

@hurmet.noka ,

Could you maybe point out to which lines (Line Number if possible) that you were referring to ?

Did you tell about this? for LDTA?

If yes, it’s affecting your data? or any issues?
It may be due to autofit of your column.

@hurmet.noka ,

When analysing the first portion of the data (2-3 rows ), we found Newline Entry, But I believe it is at the end of the row.

I believe the csv is in the proper format. Instead of Txt, try to open the csv in Excel.

Or Let us know if you have already tried performing an operation and it failed due to the reason stated.

But if I open it in excel is wrong because f these lines.
see below:


Fuel Data.xlsx (440.3 KB)
When i read the data in excel i get this.

If you scroll down you will see irregularities.

I have to remove the new line character on those problematic lines and to bring them on their proper line

I open the document in excel but I not face any issues. Kindly refer to the image


How come, I have this wierd issue?

Right click your CSV file and select open with Excel and see the results

Is the result above.

Which Excel version are you using?

@hurmet.noka ,

Let us Recap/Review the Implementation on How you might have received the Irregular data in Excel. Could you confirm if the below Steps were used :

  1. Read the CSV file using Read CSV Activity.
  2. Get the Output Datatable.
  3. Write the Output datatable to an xlsx file using Write Range Activity.

When Reading the CSV file , there is an error on 417th line, because of Extra data in the same line or it couldn’t find the headers for that value. (Starting from BQ Column)

We would need further information on How many columns are there in total ?

1 Like

@supermanPunch , I think some error or data missing in particular line, so it consider as a single line.