Sequence uipath endless loop

Hello UiPath Community,

I am encountering a looping issue within the Excel Application Scope in UiPath Studio. After using the Read Range activity to retrieve data from an Excel sheet, I’m iterating through the DataTable with a “For Each Row” activity. My workflow is supposed to log the data from each row, but instead, it enters into what seems like an endless loop, logging the same data multiple times.

Thank u

hi @tal

Welcome to the Community!

Can you show what is it that you’re using in log message?

Thanks

image

i have only three names in my excel and it is printing them in and endless loop

Check If you’re using any indexes in the expression anywhere?

Check if by mistake there’s a loop forming in your flowchart?

I dont have any index or loop by mistake
could be i have here a problem?

Hey @tal

Put a breakpoint at assign activity which is inside the for each row, and debug the workflow, when execution point comes at breakpoint then go to immediate panel and put output.Rowcount and see what’s the row count, and try to solve it by your self, I’m sure you resolve!

Or If you need any further assistance then kindly, share input excel if it is not confidential or else some dummy data!

Regards,
Ajay Mishra

i’v checked everyhing, i printed the count of the table and it is three and also that is printing in endless loop.
i also added break points and it seems that the whole sequence is prining in endles loops.

Okay @tal then just create a new .xaml or sequence and drag each activity again may be something is corrupted, I hope this will resolve your issue.

Regards,
Ajay Mishra

1 Like

Can you share the XAML with us and your dummy excel file. just replace the actual data with some dummy values if sensitive data.

Thanks

Hi @tal ,

Step 1 : Create a int32 variable, x and assign
Step 2 : inside for loop as first step assign x=x+1
Step 3 : After the steps you want add an if condition
If x = datatable.rows.count then break else proceed.

Hope this help.

Thanks,
Gautham.

@tal

Okay, Then in the for each row activity property, in Max Iteration put ouput.RowCount

Screenshot for your reference:
image

It will definitely resolve your issue!

Regards,
Ajay Mishra

Thank you every one for your help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.