Compare excel two files

Hi all

my scenario is in excel file 1 you have column id as 1,2,3,4 and salary as 1000,2000,3000 and zone 5,6,7 and excel file 2 column is id 1,2,3,4 and salary 1000,2000,4000. and then output will id and salary column matches it should say yes or no…

read Excel1 and save in Datatable1 variable
read Excel2 and save in Datatable2 variable

then use this query in if condition .

(From x in Datatable1.AsEnumerable()
where (From y in Datatable2.AsEnumerable()
where convert.tostring(x(“ID”)).trim.tolower.equals(convert.tostring(y(“ID”)).trim.tolower) and convert.tostring(x(“Salary”)).trim.tolower.equals(convert.tostring(y(“Salary”)).trim.tolower) ).count>0
Select x).count>0

You will get a Bool Value u can determine if the value exists or no

2 Likes

thank you but can you show me flow.

Forum is to guide People Not to Spoon Feed.
Please Go through the Academy Video for more insight

ohh thank you Vijay , have a great day

Hi, Vijay,
Forum is the platform where we explain the queries. They ask questions bcoz they are exploring the ideas. My personal thought.

Agree with @Vijay_Tulsalkar on this. The information he has given was already very informative :slight_smile:

this is my work flow i am getting error in if condition…

Excel2.xlsx (8.6 KB) Main.xaml (12.9 KB) Excel1.xlsx (8.6 KB)

Please check and help me on this…

Thanks,
Suresh.

Hello @suresh_kumar4,

Please find attached file for Excel comparison.

Compare_Excel.zip (28.6 KB)

if we have excel and a text file how can we compare it