I have a table in an excel page. In this excel table, more than one table is listed one after the other (the columns of each are the same).
I need to make some opearitons for each row. That is why i used “For each row” activity .But i have to ensure that this loop is done separately for each table.
The thing that distinguishes these tables on excel is customer numbers.
How can I do a separate operation for each table and for each row?
How do you want this data split between two tables? If I’m understanding correctly, you want some of the information from this table to exist in two separate tables you’re planning to iterate over.
Secondly, how do you plan to use the data (abstractly speaking)? You may be able to just iterate over the same table twice and perform different operations each time rather than splitting it.
Maybe your case allows you to get distinct values for customerNumbers (removing the header value) then iterate over them, filtering the DataTable accordingly.
Assuming you DataTable is name MyDataTable and the DataColumn is named name, you can either have a data table with only one column or a System.Collections.IEnumerable:
DataTable
MyDataTable.DefaultView.ToTable(true, "name")
IEnumerable
From row In MyDataTable.AsEnumerable() Select row.Field(Of String)("name") Distinct