Concatenation and Lookup in Linq

I have two excel files, lets say EmpDetails1 and EmpDetails2
EmpDetails one has firstname, last name , fullname , i want to concatenate firstname and last name, add it to the Fullname Columns. How to achive this using linq??
Empdetail1 and EmpDetail2 has a common column, how to lookup these two columns using linq.

How to Concatenate and Lookup the values using linq in UIPath ??
If someone know the solution. Please suggest

Hi @shivarajvp555 ,

Since it is a Simple update we usually go for For Each Row in Datatable method. But we could also check with a Shorter approach by using DataColumn Expression method.

Try using an Assign Activity like below :

DT.Columns("fullname").Expression = "ISNULL([firstname], '')+ISNULL([lastname], '')"

Here, DT is your Input datatable, fullname is the column name to be updated, firstname and lastname are the columns whose values should be concatenated.

Let us know if you are able to achieve the updation using the above method.

For Lookup, could you provide us more details on what needs to be performed ?

More on updation of values in Datatable :


Hi @supermanPunch I tried this, Its working.
Further i want to add this to full name column of excel file.
If i used loop to add it will take much time since data in excel is more than 50000 rows.
How to add all the data in single go. Is there any ways to do it .
Please suggest.


@shivarajvp555 ,

Could you let us know what method have you used ? If the method used is the above expression, then the fullname column should be populated with the concatenated values.

Do you want to populate this concatenated column values to other Sheet column or other Excel sheet column ?

Yes output is populating the fullname data. i want to add only full name column to the excel sheet.

Nice solution can you please help me here what is .Expression how this method work ?

@Aleem_Khan ,

It is a Property that is available within Datatable Data Columns, that we could leverage for computation of Simple and easy updates of columns, More on it on below documentation :

@supermanPunch Please let me know how can we add this to new excel sheet column

Hi @shivarajvp555 ,

Could you show what is the Schema or the Columns available in the other Excel sheet? So that we can understand if can perform a Join Operation using Join Datatables Activity and then preserve the required Columns.

You could also go ahead and use the Join Datatables Activity using the Common Column Names for the Join and let us know if you are able to achieve the result.

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