Replacing Datatable for multiple datascrapes


Iv’e tried google the solution, but I really can’t seem to find the error.

I’ve made a flowchart reading a cell in excel and opening a browser and doing a datascrape, and writing the scraped data to Excel.

The first loop is working perfectly, but the second and following runs is writing the same data to Excel as the first scrape found.

So the datatable isn’t updated in the loop. Why?

Main.xaml (49.1 KB)

Regnumre.xlsx (8.5 KB)

I reviewed your XAML…
in second excel application scope instead of opening new instance, assign existing excel application scope to a variable (you can do that via first excel app scope>property>output>workbook) and use that variable in second excel app scope.
Your problem should be solved.


  1. If your process does not require formatting of excel cells etc… use workbook activities instead of using excel scope.
  2. Instead of writing individual cells, try to write range for better performance

Thx for your input, iv’e tried doing what you proposed, but I get the same error.

The three lines should be different.

Main.xaml (48.9 KB)

How can I write range horizontally, when I tried using it, it writes vertically.

yes @Michaeljep you are correct…
because by default extract datatable activity appends the new data to datatable variable…
just write your datatable (ExtractDataTB) to test excel file, you will get the idea…

to get your desired datatable do below
after last write cell activity
assign > ExtractDataTB = nothing

if required use below as well
assign > ExtractDataTB = new System.Data.DataTable


Thank you very very much for your time and help. Assigning ExtraDataTable to new System.Data.DataTable did the trick.

Now it works perfectly :slight_smile:

that’s great @Michaeljep… .cheers.
please mark your post as resolved so that it can help others as well to solve the same or related queries…

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