Loop Wont Progress

Hey team,

I was wondering if you could help please, I cannot figure out why the loop in my data entry to a website won’t run to the next row of data in excel. I am using Studio X and obviously, some solutions won’t work.

Please advise.

Hi,
Two quick questions:

  1. The Excel file you use has rows in it? And does it exist?
  2. Why do you use a For Each Excel Row Activity inside a Repeat Number of Times activity? From the scope, I think StudioX does not know what Row is and therefore does not enter the For Each Excel Row. Try removing the Repeat Number of Times.

Hi Johannes,

  1. Yes and Yes
  2. I tried the following;
  • “For Each Row” only
  • “Repeat Number of Times” only
  • “For Each Row” + “Repeat Number of Times” combined

All of these options result in the loop getting ‘stuck’ on one row of data and never going down the list. I have tried editing the excel document to suit the automation as there were some redundant rows and it still gets ‘stuck’.

I hope that makes a bit more sense?

Try to debug with a simple Message Box that would display the value of the CurrentRow.
In your case, for instance, [CurrentRow] CoursesDetail, where CoursesDetail would be the Header of the column.
In your flow, you are trying to enter hard-coded every time the value of cells C54, D54 of the CoursesOfferings sheet in your Excel.
I think what you want to achieve is to iterate throught the Excel rows and have the following values (depending on column header names):
CurrentRow.ByField(“Course Code”)
CurrentRow.ByField(“Course Detail”)
CurrentRow.ByField(“Course Type”)

And I still insist that the Repeat Many Times is not needed here. Just use the For Each Excel Row.