How to read row from 3rd row in excel

Hi guys,
I Wonder how to read excel from 3rd row.I know there is activity called read row but i don’t want to use that activity.I am using for each row to get data.So is there any way to read row from 3rd using foreach row datatable.I attached screenshot of sample excel please let me know any solutions.

Note: I used Excel_Data.Rows(3)(Index_Value).ToString To read from 3rd row but its passing error as “there is no row at ____”


you can create an int32 variable as index and check if (index>2) inside for each row to start from 3rd row

Can you please give me an example?
where to assign variable index?

Hi @check_account
First you need to create a index variable that is available in the for each row in datatable properties . By default the variable value will be zero and every time the loop increases the variable will also be increased automatically by 1.Then you need to add a if condition and set the condition as index_variable > 1. The bot will process only once the index value is greater than 1.(i.e row index starts from zero)


create variable i (int32) and pass it in this index(you can see this in the properties panel of for each row activity)

But It also reading empty cells! i dont want to read empty cells.What should i do to prevent reading empty cell while reading from 3rd row?

yes i did by your and instructions but it also reading empty cells !

Means is it reading 11th rows in ur excel?

Hi @check_account
then add the condition as if intindex > 1 and currentrow(yourdesiredcolumnindex).tostring.length>0
the bot will process only both the conditions is satisfied.
Here what we are doing is checking both the index and length of the value in the row.if the length is greater then zero means the cell is not null

yes it is !

Thanks dude! It worked and i am getting desired output.

Hi @check_account Thanks for marking as Solution.

1 Like

Great to hear that i was able to help you Manh!!!

Hi @check_account ,

The Below maybe an Alternate Solution, if you want to Skip the first 2 rows in the Datatable, provided there is no action to be taken on the first 2 rows.

thanks dude! is it possible to split words in the cells ?
word: Deccan Medical Center
split the word like

  1. Deccan

@check_account , It is possible. But we would need to know more info of How you would require the Output.

As we can see you have already found a solution for the query raised. You could create a new topic for the other case, since it is not involving the Topic mentioned here.

1 Like

sure dude i will create new topic on it!

1 Like

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