Read from an excel file, Scrap multiple search results and write in the same excel File


I have just made a sequence to read an excel file then search for that over google, scrap the required information and to write it in the same excel file. However, I’m able to get only one search result that of the last google search result in the selected range to be written.

Please advise on how to write the extracted data table to written one below another rather than over writing the last result over the previous one. .

Hi @Sachin_Kumbhar

Welcome to the community!! :smiley:

So, once you read the data in excel, you loop through each record and scrape the data right? and then, you come back and write the data back into excel one at a time i suppose?

In that case, in the write range activity, you can make the range property dynamic. So in your loop, have a counter variable starting from 2 (assuming you have headers in the first row). In every iteration, increment this counter variable by 1.
In the loop, have the write range activity, and for the range property make it something similar to this

–Assume you start writing from column D - suppose column A, B, C have data because you are writing to the same excel you used to read data
so the range property should look like

"D" + CounterVariable.ToString
So in every iteration, counter variable will have the row number. So it will not overwrite the existing data.

or else, If you are trying to write an entire data table that contains multiple records at once, you can actually use the Write Range for the first iteration. And for every other iteration, use the append range activity so that it will add the new records just below the existing data.

Does it help?

If this works for you, please make sure to mark my answer as the solution so it could help others a well :slight_smile:

1 Like

Hi @Lahiru.Fernando

Thank you so much for your response and suggestion. I understood the logic and had tried to make it dynamic in multiple ways and failed… However, me being completely new to uipath I guess I have missed some points in the loop… Please review the file here and let me know how can I fix this.

Thank You!

Hi @Sachin_Kumbhar

I cannot test because I do not have what sites you are working on. But I did the change. It should work for you…

Main.xaml (20.1 KB)

Let know whether this helps

1 Like


Buddy…! Saw your workflow, you are doing amazing with the design.

Based on your queries, there are few suggestions that can considered for better performance and of-course it resolves your issue as well.

  1. you mentioned like “However, I’m able to get only one search result that of the last google search result in the selected range to be written.”…alright, kindly check with MaxNumberOfResults property in your extract data activity.
    i saw your workflow, it was mentioned as 1. Usually if you mention 0, all the identified elements will be added to the output variable that you assign and default value is 100.

As you mention as 1 you are getting only one record in output excel. kindly check with that.

  1. Try to use append range instead of write range, this would write data one below another rather than over writing…

Hope this would help you…

1 Like

Hi @Lahiru.Fernando & @Palaniyappan ,

Thank you so much for your tips and suggestions. The append range had worked for me to overcome my problem. However, as the operation runs, google was able to detect unexpected traffic and “I am not a Robot” - Captcha was popping up and I had to put in delay time after each action.

I have uploaded the final file for your reference in the same Drive link above.

Thank You so much!