A fast way to replace some characters in .CSV?

Hello guys,

In a process I manipulate a csv file that contains the symbol “:” in some of the cells.

I would like to know a fast way to replace the content of the csv file so that the symbol “:” will be replaced into “”.

Thanks!

You can use a Read Text activity, and change the output string (e.g. MyString) using MyString.Replace(":" String.Empty). Then use a write text file to overwrite the file. This works on CSVs, since these are just comma-delimited text files.

4 Likes

@EngAnalyst

  1. Use Read CSV file activity to read Data from CSV file and will give you output as DataTable.

  2. you can download this package from https://connect.uipath.com or you can directly install it through Manage packages. Search for DataTable.Activities. Once downloaded use Replace String in DataTable activity and pass above output. It will help you to replace particular string in DataTable.

  1. And then use Write CSV Activity and pass above output to write back output into CSV file.
2 Likes

Thank you so much guys.

I hope you have a very nice day.