# Compared two sheets and get data

**URL:** <https://forum.uipath.com/t/compared-two-sheets-and-get-data/499976>\
**Category:** Studio\
**Tags:** studio, excel, activities\
**Created:** [December 18, 2022, 2:39pm UTC](https://forum.uipath.com/t/compared-two-sheets-and-get-data/499976 "2022-12-18T14:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aarthy1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aarthy1/32/265948_2.png) [@Aarthy1](https://forum.uipath.com/u/Aarthy1)\
**Post date:** [December 18, 2022, 2:39pm UTC](https://forum.uipath.com/t/compared-two-sheets-and-get-data/499976/1 "2022-12-18T14:39:09Z")

</div>

Compare input 1 file 1 St column and Input 2 file 1 St column if  
[Input 2.xlsx](https://forum.uipath.com/uploads/short-url/uMEsYKx1tM9yJhAecLY4IogZooG.xlsx) (6.4 KB)  
[Input 1.xlsx](https://forum.uipath.com/uploads/short-url/xnvE5gjn0INxfnDvqbYfPRlAqVk.xlsx) (6.7 KB)  
[output.xlsx](https://forum.uipath.com/uploads/short-url/eqAOGrxfwagE49AUnX312ueseRA.xlsx) (7.5 KB)  
he data is match put Y in input file 2 column of input 1 file , i attached the excel file also

---

<div class="post-metadata">

**Author:** ![Anil\_G](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anil_g/32/524291_2.png) [@Anil\_G](https://forum.uipath.com/u/Anil_G)\
**Post date:** [December 18, 2022, 4:05pm UTC](https://forum.uipath.com/t/compared-two-sheets-and-get-data/499976/2 "2022-12-18T16:05:09Z")

</div>

@Aarthy1

Please follow the steps

1. Read the input1 into datatable(dt)
2. For each row in excel on input2
3. Use filter datatable and filter dt1 with currentrow(0).tostring
4. If filtereddt.rowcount\>0 then use assign currentrow(1) = “Y”

Cheers
