I have a file with 34 columns of data of which I want to concatenate 3 of them into a new column, how can I do this ?
here is a shortest way using Linq i have attached the flow for reference
(From row In dt_data.AsEnumerable()
Let concat = row(“Col1”).ToString.Trim & row(“Col2”).ToString.Trim & row(“Col3”).ToString.Trim
Select outputTable.LoadDataRow(row.ItemArray.Take(3).Concat({concat}).ToArray(), False)).CopyToDataTable()
NewActivity.xaml (10.4 KB)
Hi @Qadar
Read Range to DataTable, Add Data Column, use For Each Row with Assign row(“NewCol”) = row(“Col1”).ToString & “-” & row(“Col2”).ToString & “-” & row(“Col3”).ToString
col1,2,3.. replace with your actual column names , then Write Range.
Happy Automation
you can. use datacolumn expression
use assign with dt.Columns("FinalColumn").Expression = "[Col1]+[Col2]+[Col3]" thiw will concatenate all the data
cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.