Hello,
The datatable header have trailing spaces and I would like to clean it up. I have this for each but wonder if we can convert it to LINQ?
Assign:
DT.Columns(i).ColumnName = DT.Columns(i).ColumnName.Trim
Hello,
The datatable header have trailing spaces and I would like to clean it up. I have this for each but wonder if we can convert it to LINQ?
Assign:
DT.Columns(i).ColumnName = DT.Columns(i).ColumnName.Trim
we would recommend to stay with this or similiar approch like:
A LINQ has the risk to result in more code length or Blackboxing
by invoke code activity
Hi,
Can you try the following code in InvokeCode activity?
Dim dtIn as DataTable = dt
Enumerable.Range(0,dtIn.Columns.Count).ToList.ForEach(Sub(i)
dtIn.Columns(i).ColumnName=dtIn.Columns(i).ColumnName.Trim
End Sub
)
Sequence.xaml (7.3 KB)
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.