For each row DataTable

I have a problem where I am trying to loop through each list in a DataTable created from a data scrape session.
Everything works fine if I decide to open the scraped URLs in new browsers, but that is not really optimal since those are a lot of web pages to be opened at the same time.
What I want is to create a navigation to the datascraped URLs and go through them one by one, but it seems like the problem lies within the loop not going through each item in the DataTable.
I will upload the project down below so you can get an idea of what I am trying to accomplish.

Main.xaml (21.6 KB)

Hi @Robert_Wennberg,

Did you tried Debugging it?. And never share your workflows directly here, you can share screen shots of exception and your requirement.

Thanks,

Thanks for your quick response!

I was not aware of not sharing your workflows directly, I will be more careful with that in the future. Thanks for the heads up!
I will try debugging and see if any easy fixed errors occur, but from what I read it seems like I have not been able to assign the For Each Row to go through each item one by one before it starts again…

Seems like there is an error finding the attached browser and selector. I have tried many variations and I have not been able to find a solution since the selector and URL works fine at first, but once it has looped it can not find it…

Try repairing selectors. And are you working on each of the url. Because it is not possible to automate them. Just open them and have a look at them is fine.

I repaired the selectors and as a temporary solution, I created a new URL navigation so the automation understands where it is and starts over from the beginning. Everything works fine now though and now the only thing remaining is how to make every looped data extraction go into separate work sheets!
Thank you for taking your time to help me out!

1 Like

When you use Write Range activity you can define a different Sheet Name for each case. If you only want to separate them and the name doesn’t matter, maybe somethink like this is enough.

"Sheet"+index.ToString being index defined as output in the For Each Row activity

1 Like

Sorry for the late reply but I did not see your respone!

I actually added in a Write Range activity with row(0).ToString and after that a Clear Data Table activity and it creates new sheets and inserts the respective name for each sheet. Not sure how I managed to do that, but now it works like it should haha!
Wish I could have seen your response earlier rather than scratching my head for longer than I should have

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