I have data in two sheets in the same excel.i have lo lookup data from second sheet and write the resultant value in the first sheet.how to use for each loop in this case.
Hey @sanjana1830
Welcome to the community!!
There are several ways of doing it
-
Have you tried using the lookup datatable activity?
2.second method
Read the two sheets into two datatables
Then use join datatable activity using inner join type so that it will return only matching records -
Third approach
Read data into two datatables
Use a for each row activity for one datatable
Inside that use another for each row loop for the next
Then inside the second loop, use a if condition to see whether its matching or not…
However, the most efficient approach would be the lookup datatable activity or the second approach I mentioned here
1 Like