Compare excel

Hi I’m having a problem creating Robo to compare two excel files

Hi @thota_sampath

Please explore it clearly, are you finding issue with creating a Robot or Comparing excels?

Thanks
Latika

Hi @Latika10011740

Thank you for the response

I’m finding an issue Creating Robot

Eg: I have one excel(A) file with 4 sheets in it and other excel(B) file with 4 sheets, So I want to compare both the excel files has same data or not

Hi @thota_sampath do u want compare by sheets By sheets like sheet1 of A with sheet1 Of B?

Hi @NIVED_NAMBIAR

I want to compare complete Two Excel files with each other

refer below.
Two DataTable : DT1, DT2
Assume that tow datatable have same columns.

Union DT1, DT2
DT1.AsEnumerable.Union(DT2,System.Data.DataRowComparer.Default).CopyToDataTable

Except DT1, DT2
DT1.AsEnumerable.Except(DT2,System.Data.DataRowComparer.Default).CopyToDataTable

Intersect DT1, DT2
DT1.AsEnumerable.Intrsect(DT2,System.Data.DataRowComparer.Default).CopyToDataTable

good luck.
Enumerable.Except Method (System.Linq) | Microsoft Docs