Comparing two excels

How to compare two excels having similar column name . And output how many numbers matched comparing both

Hi @vishal.kp

See these threads

Thanks,
Prankur

2 Likes

We have lot of topics available on forum with the same question @vishal.kp

Please go through thes link

https://forum.uipath.com/search?q=compare%20excels%20status%3Aclosed

1 Like

can you please explain more on your question

two excel sheets having same column name but elements are different. So i have to compare both of the columns and give out how many of them are matched in numbers

image

you can refer the screenshot regarding your doubt,if not let me know

im not able to open the full screenshot

1 Like

Fine
hope these steps could help you resolve this
–use a excel application scope and pass the file path of first excel
–use read range activity and get the output with a variable of type datatable named dt1
–now use another excel application scope and pass the file path second excel
–use another read range and get the output with a variable of type datatable named dt2

–now use a simple JOIN DATATABLE ACTIVITY and pass both the datatable as input and use full join or any join method you want based on the requirement…and get the output with a variable of type datatable named Finaldt

–now use a final assign activity like this
int_finaldtrowcount = Finaldt.Rows.Count

–now a write line activity like this
"The number of matched rows is :" + int_finaldtrowcount.ToString

simple isn’t it
Kindly try this and let know for any queries or clarification
Cheers @vishal.kp

while joining the table i get unwanted columns mixed up with the output. I used inner join

i didnt get this statement
kindly come again
Cheers @vishal.kp

suppose i have two excel sheets of data having two or three similar column names and rest of the columns are different. I wanted to check the similarity of the columns with same name. I used join function but im getting the output but there are also the different columns coming with it

Join datatable activity is applicable in your case with this scenario
but for this

Then we need to use LINQ query method @vishal.kp

Cheers @vishal.kp

Kindly let know for any queries or clarification
Cheers @vishal.kp