Click on “Sales Opportunities”
Extract a data table from a web page
save it to a data table
You will be able to see multiple countries in the “Country” column.
We need to filter out the details based on each country and place them in different excel sheets.
ex. if country name=India then past the entire row data in that India named excel
Very simply you can copy the selected row from the source DataTable into a one-row target DataTable and then call WriteRange to write this DataTable to Excel (Add Headers = false).
It would create the same effect as copying an entire row to Excel.
If you have to repeat this process then you have to keep track of the last cell number where you wrote the previous row.
For example if you wrote the first row to cell A1, then you keep track of the fact that a row beginning in this cell is populated. When you paste the next row, your starting cell will be A2
Hope you are able to scrape the table data. If yes then it will give output as DataTable. Let’s say ‘InputDT’.
CountryDT = InputDT.DefaultView.ToTable(True,"Country")
For Each row in CountryDT
UniqueCountryDT = InputDT.Select("Country = '"+row("Country").ToString+"'").CopyToDataTable
Use Write Range activity and pass UniqueCountryDT DataTable and sheet name as row("Country").ToString
The above method will create separate sheet for each country and will write data into it.