How to Remove a Newline from an Excel cell using UiPath

Hi @tmcwade12

  1. Use “Read Range WorkBook” activity and read the excel and store it in an data table say dtExcel.
  2. Use “For Each Row in Data Table” activity to iterate through each row in excel.
  3. Use the below two syntax in assign activity:
CurrentRow("Departure Time")= CurrentRow("Departure Time").ToString.Replace(vbLf, " ").Replace(vbCr, "")

CurrentRow("Arrival Time")= CurrentRow("Arrival Time").ToString.Replace(vbLf, " ").Replace(vbCr, "")
  1. Use “Write Range Workbook” activity to write the data table back to excel in new sheet.

Uploaded the workflow for reference:
Sequence10.xaml (8.9 KB)


Hope it works!!