Combine Two cell value

Hi,

I am having two columns in excel, I want to combine 2 column values and paste it in 3rd cell how can i achieve it?

1 Like

Hi @monish06

Use Merge Datatable activity

Thanks
ashwin S

@monish06

  1. Read data using Read Range activity.

  2. And then use ForEach Row activity to iterate DataTable.

      ForEach row in inputDT
           row("ColumnName-3") =  row("ColumnName-1").Tostring+row("ColumnName-2").Tostring
    

And finally use Write Range activity to write into Excel file and pass inputDT to it.

2 Likes

Hi @monish06

1.Use Excel Application scope Activity pass the path of file.
2.Next use Read Range activity create output data table variable.
3.And then use for each row activity pass output data table variable.
4.Inside for each row use Get Row Item Activity in properties pass Column Name and create output variable(column1), again use one more Get Row Item Activity same as before(column2).
5. Use assign activity column3 = column1+column2.
6.row(“YourColumnName”) = column3.

Regards,
Kommi Jeevan.

Hi
Hope these steps would help you resolve this
–use excel application scope and pass the file path as input
—inside the scope use READ RANGE ACTIVITY and get the output with a variable of type datatable named dt
—now use a ADD DATA COLUMN activity and mention the third column name and the datatable as dt and type argument as string
—then use a FOR EACH ROW activity and mention dt as input
—and inside the loop use a assign activity like this
row(2) = row(0).ToString+row(1).ToString

—then use write range activity and mention the input dt variable and enable add headers property
Cheers @monish06

2 Likes

cl3 = (C1).tostring + (C2).tostring

Try this it will work

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.