My for each loop is unable to go to the next row

I am trying to run a process, here is what it does:

  1. Read range from Excel file
  2. Data scrap a table from an application
  3. For each row in the extracted data table, it would compare for each row in the excel sheet if the “PO” in the excel sheet is the same as “ESO” in the extracted data table. If it is the same, it would output the “Status” from the excel file onto the application

The problem is that it reads the information both the excel and the extracted data table correctly, row by row but it keeps outputting to the first row only. So like the 1st, 2nd and 3rd Statuses are all output only on the first row.

Hello @Bob_Lim

Can you please share the screenshot of the for each row activity and the step in which you are writing to the excel.


Hi @Rahul_Unnikrishnan

I first read range for the excel sheet, then open up my application, data scrape the information and use the for each loop. At the bottom of the image in the if activity is where i type into the application. Maybe thats why it keeps writing on the same row. If so, how do i solve this problem.

Thank you!

Here the ExtractDataTable is the outer datatable and for iteration of row in this table, the inner datatable dtVSR will loop through all the rows.

So if the condition is true, are you updating the data in ExtractDataTable or dtVSR?


The application is the ExtractDataTable and the dtVSR is the excel sheet. So as you said, for each row in the ExtractDataTable, dtVSR will loop through all the rows in the excel sheet. If the condition is true, it will update in the ExtractDataTable and move to the next row.

understood. So can you show the step in which it is updating the value in ExtractDataTable.


Hi @Rahul_Unnikrishnan

So in the If statement, the type into is where it would type into the application after checking the the ESO = PO. My guess is maybe that is why it keeps looping and not going into the next row. If so, how do i solve for this problem.


Here are typinginto excel or another application??

If excel instead of TypeInto use Write Cell activity .


In the application.

i removed it due to sensitive information

sorry…Didn’t understand your point

I removed the screenshot in the type into section as there was sensitive information. So the type into is to type into the application and not the excel sheet

@Manish540 @Palaniyappan Please help.