Thanks ppr
Out of curiosity could you maybe guide or briefly explain what this specific code is doing?
(From r In dtData.AsEnumerable
Select ia = r.ItemArray.toList
Select ic = ia.ConvertAll(Function (e) If(isNothing(e), Nothing, e.toString.Replace(" “,”")).toArray()).toArray()
Select dtCorrected.Rows.Add(ic)).CopyToDataTable()
(From r In dtData.AsEnumerable - iterating over all rows
bringing the ItemArray (Array with all column values) to a list
ia.ConvertAll(Function (e) If(isNothing(e), Nothing, e.toString.Replace(" “,”")).toArray()).toArray() - iterates over all cel values and is doing the corrections (e.g. replace)
Select dtCorrected.Rows.Add(ic)). - adding the modified ItemArray as new row to the datatable dtCorrected