Advice on looping through an excel

I have a question if someone has an idea for best practice on this project I am working on. I have an excel that has numbers in each cell across 9 columns. I need to loop through the range, and each row take the numbers and put them into a website one at a time.

After the first line is put into the website, I then need to do a series of screen clicks/scrapes, save the information and then start over again with the 2nd row in the excel.

This needs to happen for each row in the excel. Each week there will be a new excel so the amount of numbers might change but the number of columns will always be 9. Below is a screen shot of what the excel looks like and a screen shot of where on the website the numbers need to go.

image

if you copy the row and paste it over here does it work…or if you copy the row in a notepad and paste it in the website does it work?

Yes if I highlight the entire row, copy it and then click into the first box on the website and paste it does populate the entire row.

I would then need to click submit and take a screenshot of the results, go back to the main page and start over from row 2.

Hello @atarantino

You can try it in 2 ways.

1st method:
1)Read excel
2)Use for each row in datatable
3)Get each value from the row and use typeinto to type the value to each tab.

2nd method
1)Read excel
2)Use output datatable activity to convert it in to string
3)Loop through each line
4)either use send hotkeys ctrl+v to paste the value

Then all values will get add in single step. For first process you will have to type into each tab.

1 Like

1.use foreach row activity to loop through each row
2.use Datarow.ItemArray to covert datarow to array as listArray
3.set to clipboard string.Join(“”,listArray)
4.Click on the first column in the application
5.Use send hotkey ctrl+v
6. click submit and take a screenshot of the results, go back to the main page

2 to 6 steps must be inside the loop

Hi @atarantino,

If you know how to use a queue, create a queue structure for tracking and logging.

Let each queue be one row in your excel. As the specific content, let it be a string value consisting of columns and enclosing all lines when pasted.

When you go to each process, you do this process quickly, read it and print it to database or excel.

At the end of the day, you will not have any data loss and you can use a retry mechanism for records that receive errors.

Regards,
MY