For each row in a data table only runs one time

Hi, I am new to UiPath. I was working on a bot which reads ip addresses from an excel file and loops thru each row in the extracted data table. inside this loop , it goes to a website based on the ip address and scrapes data and writes to the same excel file. This loop only runs once and exits. Tried many times even in debug mode, not getting any clue. If anybody could share your thoughts, it would be very helpful to me.


May I know what error are you getting at the time of second iteration ? And also can you check input DataTable row count before For Each Row activity.

no error. it just ends the execution.

put an assign count = 0 outside of your for each and then within the for each put an assign count = count +1

can we see your code please?

also i think the problem is in the scrape activity, so can you check the selector? check if its return any value please?


@mail4bobbysam It looks like extracted data table has only one row so it loops only once. To get confirmation on this can you please print the no of rows in the data table

extracted data table.rows.count

*Also, make sure you are not using any break activities inside the loop

Hello @mail4bobbysam,

Could you share with us the range your are getting to loop? :slight_smile:

Fernando, thanks for your immediate attention, how can i show you the code?
export it as excel? and upload it here?

you can upload you xaml file, or take screenshots, so we can get an idea