Stop an execution when there's an empty Excel cell

Hello!

Which is the appropriate activity I should choose when I want to stop an activity from executing when it runs into an empty cell?

Best,

Pablo G.

HI
welcome to UiPath community
usually we will be finding whether a cell is empty or not by
–first getting the datatble from excel with a variable
–then iterating through that datatable with a FOR EACH ROW activity
–and then with a IF condition like this
String.IsNullOrEmpty(row(“yourcolumnname”).tostring)
if true it will go to THEN part of if condition which means that cell is empty in that iteration of rows
so now in the THEN part we can use BREAK activity which will stop the iteration of for each row loop and comes out of that loop and proceed with the next activity placed after the for each row loop

hope this would help you
Cheers @PabloJGF

2 Likes

Thank you very much, @Palaniyappan

It did work the first time, but when I try to write in cells, while using the break activity, it doesn’t work. I think I’m using the wrong activity.

What I’m trying to accomplish is to input something in a range of cells and have the activity stop once there’s an empty cell. The cells in which I’m writing in already have something in them, I’m just trying to replace whatever is inside.