How to create separate DataTables in a For Each Activity and extract these DataTables to separate sheets in Excel

studio

#1

Dear Developers,

I have a problem when creating DataTables in a for Each Activity.

The case is as follows: Based on an Excel-file (Input) I searched on google.nl to company names. Then I want to extract a table for each row (input) and add all of the extracted data (datatables) in 1 excel file (separate sheet names for each datatable/row).

My robot overwrites the created datatable, so I only see the first company in the created Data Table within the for each activity.

How can I create separate Datatables (based on input/company names) within a for each activity and add all of the extracted data in 1 excel?

Many thanks in advance.

Kind Regards, Teun


#2

Option1: You can use Array of Datatable.

Option2: You can write the excel file inside the For each row itself. This will be the correct approach i guess.


#4

Thank for your answer, but these options doesn’t work. Look, when I search two companies (for example Apple and Microsoft) on google within a for each, then extract structured data into datatable and then write range to Excel based on variable sheet names. So for each company a separate sheet.

But the problem is, that it creates two sheets (apple & microsoft) so that works, but in both sheets I see the data from apple. How can I solve this?

Many thanks in advance… KR


#5

Set the Scope of ExtractDataTable as Sequence inside For Each Row. This will avoid mixing of data


#6

Thank you so much!! It worked


#7

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