Compare two excel files(if any changes in values throw a msg)

Hi all,

please help me to compare two excel sheets
my excel sheet is containing columns id, name, salary, details
problem statement : i need both excel sheets should be the same values if any changes in values then raise a message

i have already tried as below

step1: read excel 1 and stored in dt1
step2: read excel 1 and stored in dt2

i have applied for each row and compared with column values but im not getting correct output
help me to do this

aa1 - Copy.xlsx (11.4 KB) aa1.xlsx (11.4 KB)


1 Like

Hi @vamshiRaghava_Midjil

i hope below linq will help you to find out the differences

          ( From table1 In dt1
            Join table2 In dt2 On table1.Field(Of Integer)("id") Equals table2.Field(Of Integer)("id")
            Where table1.Field(Of String)("Name") <> table2.Field(Of String)("Name")  OrElse   table1.Field(Of String)("salary") <> table2.Field(Of String)("salary") OrElse   table1.Field(Of String)("details") <> table2.Field(Of String)("details")
            Select table1)

thanks for your reply @prakaz25
could u please share any flow so that i can understand better

kind regards


did we try with JOIN DATATABLE activity
that is once after getting the datatable named dt1 and dt2
–use JOIN DATATABLE ACTIVITY and mention the input as dt1 and dt2 and choose the join type as FULL
–get the output with a variable of type System.Data.Datatable named dt3

–now to validate whether there is any change or not
use a IF condition next to this JOIN DATATABLE activity and mention like this
if true it will go to THEN or goes to ELSE part where we can mention the MESSAGE BOX like this
"there is a change between these two datatable"

Cheers @vamshiRaghava_Midjil

Here you go
Main.xaml (10.2 KB)

For your reference

thanks alot @prakaz25 . i got it

1 Like

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