Loop in Excel for take id one by one

Hay, I need a loop for reading excel file just id column one by one row. I add Excel Application Scope and Read Range. Then i put Assign i=0, and then id from excel = output(i).To String. What I need to do next. Please help me. I need that id one by one to download some document from browser.


You can loop through the excel like this :

Everytime it will pick the next value in the excel as you are increasing the value by 1. Make sure you have assigned the value of count to 1 so that it can pick the values from second row

yes, but I need add in loop first two column. I add something like this.

Make sense?

Can you please elaborate a bit… I don’t understand you

Hey @Tinkerbell

When you use the Read Range activity it gives you the result as Datatable.
-Next step is to iterate the datatable and get the id column value to

use it further.

If you are storing the entire excel data into a datatable, then you just need to pass the column name to the row object.


Ok, i need to open the excel and read the first and second column. I read the first column and take a data one by one. I’ll search for that number on browser and download the document. Then I need another column to do the names. And as I handle it, I have to go back to the excel document and move on to the next one(row)

As in the above screenshot, you will get the value that is required, then do all the operations within the for each row activity. So that it will download the document and then loop for the next value

Hi @Tinkerbell ,

For that, you don’t need any (i) variable.
You are already looping your datatable so every time you will get the next row data in your (row) variable.

Just make the type as String in your ForEach Row loop. and assing the first column as row(0). Assign the second column as row(1)…and so on.


I do that but isn’t working.

They always get me just a first number.

you need to replace row(0).toString to row(“desired column name”) to get the values.
by using row(0).to string() you are getting the values from row 1 only every time.

You don’t have to change anything. Just change the type as String from your ForLoop property.


it’s possible that you don’t have more data in your excel file. Just check it once.

I did, but robot do the some again. What I need add to tell the robot go on next.

I haw data I check. Sorry I don’t understand what I need to change in string?

Can you please make your loop outside of this excel scope ? Might be because of it.


Noup, it takes just a first row I try. I need to tell them to go on next somehow.

sorry I forgot. It’s For Each Row.

It’s impossible.

Can you send me the screenshot of your read range activity ?


can you please make the range as “A1:K20” in your read range activity ?

Just for the testing purpose, if it’s working or not !