For each with values stored in variables to Excel


Currently working on retrieving data from a webpage. These contain company information, each different from the other. Uipath stores all these values in specific variables. Obtaining the information is done via ‘For each row’. I used data scraping on the webpage.

These information could be from 1 individual company or 40 multiple ones.

Now i face the challenge, i exit the For each row; activity to start a workflow that puts my retrieved values into Excel, each in a specific place.

I cannot find the solution on how to do this via a loop or a for each. How can this be done in studio? Do i need to create a data table to store my values? and from there on start a for each to loop through pasting it into Excel?

Any help is appreciated. Thanks!

PS; i can’t really share screenshot, for privacy matters.

If I understand correctly, it sounds like you may be creating datatables from scraping each webpage and assigning that to specific variables for the first part of your process. Is that correct?

If so, one way to have those datatables written into Excel would be to have all of those dt variables thrown into an array, and then use a for each activity with write range (or append range) to go through each variable to write to the needed cells in Excel.

1 Like

Hi @sirwa,

as I unterstand your process you are scraping data from one webpage with one data scraping activity. As output from this activity you should get a data table with all data (in your case company names). This data table you can write directly into an excel file using the “write range”-activity.

Hope this helps.


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