Hi @Irfan_Musa
Here is a solution to change the Column Names of a data table by removing nextline characters:
The Process Flow:
- Use a For Each Activity.
- Under the In property: dt_Data.Columns. This will make the Item set to currentDataColumn automatically.
- Use an Assign Activity with the following Code:
currentDataColumn.ColumnName = currentDataColumn.ColumnName.Replace(Environment.NewLine, " ").Replace(vbCrLf, " ").Replace(vbLf, " ")
The Output:
As you can see in the below screenshot from the Immediate panel. The dt_Data before and after the for each/
If this solves your issue, Do mark it as a solution.
Happy Automation ![]()


