Hi all, I have 2 excel sheets (example below), I want to loop for each row to find are there any rows that company name in sheet 1 match the company name in sheet 2. For the matching rows, I need to copy the whole row and paste to sheet 3.
Read the sheet1 & Sheet2 and store in dtsheet1 & dtSheet2
use below LINQ expression in Assign Activity for result datatable (dtresult),
The below LINQ can fetch the required result
LINQ:
dtsheet2.AsEnumerable().Where(Function(d2) dtsheet1.AsEnumerable().Where(function(d1) d1(“Company_Name”).ToString.Tolower.Trim.Equals(d2(“Company_Name”).ToString.Tolower.Trim)).Any).CopyToDataTable
Write the dtresult datatable to the Sheet3 in excel.
Error:
Excel Process Scope: The source contains no DataRows.
I fix the above error by changing string to datatable of dtresult but it still cannot run properly and the error shows again