Hi devs, I am comparing 2 excel sheets if ref column value in excel 1 is same with ref column value in excel 2. populate column k with the respective amounts
Hi,
Use read range to read excels. store into DT1 and DT2
then use join data table activity. Use Left join.
Pls mark this as solution if it resolves your issue.
Thanks
It’s not the same column
Follow the steps
- Read excel 1 into Datatable
- Use a for each row in datatable actvitiy
- Inside that use find/Replace and find for value currentrow(“RefColumn”).ToString
- If value found …then use write cell to write the amoutn into respective column as you already have the row number
cheers
HERE IS FILE AND EXPECTED OUTPUT
Excel 1

Excel 2

EXPECTED RESULT

Use join datatable and join on Name…

Then use filterdatatable to get the required columns only

Hope this helps
cheers
We’ll populate “amount” with “cleared bill column” as seen in table. The inital excel 1 had empty amount but in the result table amount was populated with value
After this use for loop on the reultant datatable
And inside use
Currentrow(“Amount”) = currentrow(“Cleared bill amt”)
Cheers
Hi Anil_G, I have used join datatable but the output table is having duplicate rows for the join, what could have caused it or have you experienced such jusing join before?
Hi @stanstilo
- Read Excel1 as DT1
- Read Excel2 as DT2
- Create a Build Data table with your required column names - Dtoutput
- Use for each row (include inside this for each row)
3.1. for each excel2row in dt2
3.2 another for each excel1row in dt1
3.3 Compare if excelrow1(“Name”) = excelrow2(“Name”)
3.4 Add datarow in the build DT with your required columns
- You will get the required rows in DToutput
CompareExcels.zip (4.3 KB)
Thanks
