Check two datatables are same on 2 excel files

Hi everyone.

I have two excel files as attachments.

I want to check if any row in file1 is different with file2, then it will return false.

How to do that ?

Thanks you!
1.xlsx (9.1 KB) 2.xlsx (9.1 KB)

Hello There,

  1. Read excel, store output in two databale separately,
  2. Iterate one datatable,
  3. Write condition in loop like row(“Column_Name”).tostring = dt2.row(Row_Number).item(Column_Number)

this way you could do comparison between 2 datatables/excels


1 Like

Hi Bro.

I have made this flow as below but seem it not correct

Please try to use for each activity and put condition like i said. let’s see how you go

1 Like

Hi Bro.

I think could not used for each activity… if read data from datatables to compare then should use for each row to compare one by one column.

Hi Everyone

I have done by myself with flow as below

Thanks you for your support

Hi @trunghai you can do this in way

  1. Read the first excel file and store in dt1
  2. Read the second excel file and store in dt2]
    To find uncommon rows between the dt1 and dt2 use the following way

dt3 = dt1.AsEnumerable().Except(dt2.AsEnumerable(),System.Data.DataRowComparer.Default).CopyToDataTable

Then use an if condition to check the dt3 has rows or not , if dt3 has rows then the two datatable are different if not two datatables are same

Refer this workflow (2.6 MB)

Hope it helps you


Nived N
Happy Automation


Thanks you Bro

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