Repeat a sequence

Hey, guys,

Please, What activity can we use to make the robot repeat a process?

My robot takes an excel information from the website, extracts the information from the website. But I need him to return to excel and take the information that is in the sequence and do the same procedure for all lines.

what can I do? thank you very much!

Hi @Fernando_Arruda :wave:

If you want to take information from the website and based on that, take some action, use a for loop and iterate through the DT.

Cheers!

1 Like

You can use Excel application scope then Read that data using Read Range and Using For each row you can iterate each row of excel
then in Body of for each you can use process for each row

1 Like

@Fernando_Arruda

You can use For Each Row Activity, You need Read Range activity to read the Excel file and as a output you will give get a Datatable

For more reference you can check below, how we do for every row of the excel file

Hope this helps you

Thanks

1 Like

I thank everyone.

However, my problem is that I am managing to perform the whole activity only once. I need the robot to continue consulting the sequence according to the excel table.

see example

Are you saying that you get excel doc (Excel A) from a website
read Excel A
do stuff for each row in Excel A
then when done with Excel A, you go back to website to get a new Excel doc (Excel B)?
If so then you need a loop on the get excel doc process, and then inside that loop will contain the loop for the do stuff for each excel file.

Outline
read source list of website, docs,whatever
Loop 1
–Go to website and get excel file
–read excel file
–Loop 2
----do stuff to excel file
–end loop 2
end loop 1

Please, What tool do I use so that he repeats the process, always choosing the next row of the spreadsheet for a new consultation?

appreciate

for each row if using a datatable

Okay, but I have 2,000 lines for the robot to read in the spreadsheet and consult on the website.

Is there a tool? or do I have to enter a Type Into for each line?

to access the website? You can use open browser and set url = to your variable. Just close the tab on exit of the loop, rinse and repeat.

My For Each Row is reading and repeating only the first line and is not following the activity in the column sequence.

What to do?

I am sorry but I do not think I understand your workflow. Is your robot crashing after the first iteration or completing? Can you provide the steps you would take to do the process manually?

Okay, I need to extract numbers from a spreadsheet, consult on a website, extract the information and post it back to the spreadsheet and so on.

However I am not able to repeat the process, my project is being done only once.

Details follow.

I get the list in the spreadsheet with ((Read Range)) - >>>

I include for repetition with (((Do While))) - >>

I open the site with ((Open Browser)))

I write the data in the spreadsheet with (((For Each Row))) -> Type Into (ROW (1) .TOSTRING.

(((Data extraction))) - >>

(((Append Range))) to release the data in the spreadsheet.

My robot is only doing the procedure for 1 line. I need him to repeat this process for every list.

What to do?

appreciate

just to clarify, you get a row(from a list) of data from a spreadsheet A, open browser, get new data list. write this new data to the spreadsheet A, then move on to next row in Spreadsheet A?

Where are you writing the new data on spreadsheet A, is it in new columns in the same row of data?

Yes, I get a list row (excel spreadsheet). I’m writing the data in a new tab on the same spreadsheet.

But I can only do the whole process 1 time. The robot is not in the sequence in the list.

If i understand you correctly:
Read spreadsheet A as dt1.
create a new dt called dt2
For each row in dt1
–Open Browser to URL
–Get data from site (What format is this information?)
–append data from site to dt2

After the for each row, write dt2 to New sheet in Spreadsheet A.

If you need a new tab for each item in spreadsheet A , then move the write step into the for each row activity, but be sure to clear out dt2 at end of activity(or at start).

Okay, but, What function do I use to repeat a sequence listed in excel?

Not sure what you mean by “repeat a sequence listed in excel”. For each row will iterate through each row in the dt specified. So if you read range into a dt, then for each row in dt will work.

Okay, but, My problem is that my For Each Row is reading only the first line, it does not follow the sequence of the excel list, it always returns on the first line.

What tool for him to follow the sequence?

Use output data table on your read range result from the excel file, assign the output variable then use write line the output variable and see what it has, does it have all the rows?

What is the target of your read range, can you post an image?