Problem with looping in UiPath?

hello guys,
i tried to read through each cell in a column in excel file and make another excel file to store the data.
p.s :
-it works well without loop (only read and write the first cell)
-it works well until the cellReadNum = cellReadNum + 1 , i tried making a message box to print the cellReadNum value, it works well (2, 3, 4, 5…).

but when i connect the arrow to the “get cell value” box , it always read the same cellReadNum value which is 2 by default.

why is this happening ?? any help would be appreciated

anyway i dont want to use foreach because later i want to compare each cell that i read. so i want to read each cell one by one

In the Read Cell Activity, give the value as "A" + cellReadNum.ToString

You can’t assign in the variable section. cellRead always contain A2, because the variables are declared and get assigned at the starting.


thank you for your help bro, it works :grin::grin:

1 Like

You are welcome. Can you please mark my previous post as solution. Thank you.

Done :+1:

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