Comparing two excel sheet column values

I am having one excel with two sheets. I need to check first sheet column value is whether it present it in second sheet column value.For an example , like
Sheet 1 has column it has values like 123 , 345, 567.
Sheet 2 has column it has values like 345. 123, 456.
In this scenario , the value 123, 345 has matched & 567 , 456 are not matched.
I dont want to compare like row wise. I need only 123 is whether present it in sheet 2 or not.

1 Like

@Bakia_Murugesan,

  1. Read both the sheets into two data tables,
  2. Use for each row activity and add all the values of two sheets to two different arrays
  3. Check by iterating one array values into another array as

array2.contains(item.tostring)

if exists, it will return the boolean

Hello @Bakia_Murugesan
please refer the below post…

ya i have tired this.
when it compare the first sheet column value 123 with second sheet column ,it gives output has first 123 is compare with 345 it doesnt match so it gives output has not matched
then it will again compare the same 123 with 123 it gives output has matched.
Actually, 123 is matched , i need to check whether it present it or not in column wise

Hi
we can use Join datatable activity with inner join or full join method
–use excel application scope and pass the file path of first excel
–use read range and get the output with a variable of type datatable named dt1
–use another excel application scope and pass the file path of second excel
–use another read range and get the output with a variable of type datatable named dt2
–use join datatable activity and pass the above two variables dt1 and dt2 and get the output with new datatable variable named final_dt of type datatable with default value as new system.data.datatable defined in the variable panel
-For more info on join datatable activity

hope this would help you
Cheers @Bakia_Murugesan

Thank you. Got the expected result.

2 Likes

Thank you. I have got the output using your given steps.

1 Like

Great
Cheers @Bakia_Murugesan

Hello sir,
If you colud plzz share the main.xaml file. I also have the same requirement. It would be helpfull.

Flowchart2.xaml (10.5 KB)