How to skip to next row in Excel When Using For Each Row activity

image
I am doing a data entry task for which I am using For each row activity. On Initiation the bot will read row 2 , do an operation. After doing all the operation for column A and B (for row 2) it will check for "**Cell in next row for column A ** i.e. in row no.3. I have given a condition that if the cell in column A for (Currentrow +1) is Blank make the data entry.

As you could see data entry for now already is already done. So now I want the bot to skip to row no. 4 and begin the operation.

Kindly assist. @Palaniyappan @DanielMitchell @jitendra_123 @kirti.iyer

1 Like

Please use continue activity -

https://activities.uipath.com/docs/continue

1 Like

@KarthikByggari I looked into it but it didnt work .
If you could share a workfile it would be really nice.

Hi @Aditya_Bhalerao
it is easy just check whether the row is blank or not using if loop , if it is blank then use continue else do data entry.

Fine can i have a view on the xaml if possible buddy may be a zipped folder
so that i can add the condition accordingly
Cheers @Aditya_Bhalerao

Book3.xlsx (8.2 KB) SkipRow.xaml (11.2 KB)

1 Like

@Palaniyappan Take a look at it

2 Likes

@Aditya_Bhalerao
PFA
So while processing row 2 you are processing row 3 aslo. So you want to skip the row for which you already made data entry (row 3) and continue With (row 4)?
SkipRow.xaml (16.2 KB)

1 Like

@kirti.iyer This is exactly what I am looking for, although the robot is reading the same row again.

You are saying , if their is no data in column(A) then that row should be left and we have to go to next row. Am i right?

No, what I mean is (Refer Image) if we are on Row 2 the there is no data in next row (Refer image :- Lets say row 3 and column A ) , the certain operation should be done for (Current Row +1) row. Now since I am using For each row activity the bot reads the same again (i.e. Row 3).I want the bot to go to row 4 and do the same operation.

@Aditya_Bhalerao
Hi. You cannot prevent reading the next row. It will always read the next row. Just you need to put conditions so that it does not do the operation for that row. If you don’t want to read the next row you should not use for each loop. Instead you should go with assigning a data row and increment the row index.

according to the image if you are in row 2 then if their is no data in row 3 column a then we have to go to row 4…
am i right

@kirti.iyer can you please share a working file to help me understand assigning a data row activity.

Not exactly, but if we discuss what you just said we can figure a way out to skip row while using “For Each Row activity”.

Sir, any solution regarding this

After For each row add if condition and use condition statement as
row(0).ToString<>“” and followed by your activities.