How can i get row index using For each excel row activity?

Hello everyone,
I want to know the index of empty cell while using For each excel row activity.

Here’s my screenshow.

I want to print “i am empty cell” with row index.
i know i can do this by using counter variable and increase it by 1 in every loop.

Is there any way to count index without manually assigning the counter variable?

Hi,

Do you need row index of worksheet?
We can use CurrentIndex in ForEachExcelRow activity and it returns index of the target table.
So we can get row index of worksheet from CurrentIndex+Offset
Offset is row index of start cell of the table. If top-left cell of the table is A7, offset is 7.

Regards,

Hi,

I found a way to discover the excel row index:

Use CurrentRow.FirstCell and will give you like “A45”, replace the letter and you will have your index!

Best Regards

@Tiago_Santos

CurrentRow.ByField(columname).Address

That will give you the cell address ie B17