While trying to compare two excels i am getting Wrong data

Hi @Dimple_Mandal ,

have you debugged the code and checked whether there are any records on unmatched?

let do one more thing let’s change the datatype of the unmatched variable changed it to System.Collections.Generic.List<System.Data.DataRow>

see the below image for referance-

Click on the variable type dropdown and select Browse for type and then search for as seen in the below screens -
First search for System.Collections.Generics.List then after that click on Browse for Types and then there search for System.Data.DataRow and click OK

After that let’s change the LINQ of the Unmatched, just remove the CopyToDataTable() and change it to ToList

Book1.AsEnumerable.Except(MatchedBook1.AsEnumerable, DataRowComparer.Default ).ToList

after that put a WriteLine activity and there let’s check for the count of the records from the unmatched DT, like below -

and then debug the code and check whether the count is zero or is there any number greater than zero, if it’s zero then there are no unmatched records.

I hope this helps to identify the issue.

Thankyou will try that

This One Worked. There was a problem with my Excel data.

If you can provide me a good link from where i can study as a beginner

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