I need to merge the column ‘FirstName’ and ‘LastName’ into a new column
Ouput:
I need to merge the column ‘FirstName’ and ‘LastName’ into a new column
Ouput:
Read range : Read the data into datatable
Add data Column: Use add data column activity and add column ‘Name’
Use Assign activity as below
DT.Columns(“Name”).Expression = “Trim([firstName]) + ’ ’ + Trim([lastName])”
Use Write Range Activity
Cheers…!
use read range for reading the first excel and create output as dt1
use build datatable activity and create two columns as Name, Address output as dt2
use assign activity and pass the below expression
dt2=dt1.asenumerable.select(function(r) dt2.clone.loaddatarow({r(“First Name”).tostring.trim+" "+r(“Lastname”).tostring.trim,r(“Address”).tostring},false)).copytodatatble
at last use write range workbook activity to write back to excel
hope this helps
if you face any issues refer the below code
Sequence1.xaml (9.4 KB)
dt1.AsEnumerable.Select(Function(r) dt2.Clone.LoadDataRow({r(“First Name”).ToString+" "+r(“Lastname”).ToString,r(“Address”).ToString},False)).CopyToDataTable
Hello
Take a look here
Cheers
Steve
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.