Nested loop through excel

Hi all,

i’m trying to extract data from an excel file and populate it into a webapplication.
In the webapplication i have to insert multiple studentsID’s into a single courseID.

I can already read all rows from the excel and put them a datatable. After that i’m kinda stuck.

Here is a screenshot of the excel file:

Where do you Stuck? What exactly you are looking for?

Hello @m.alem1,

  1. Get Unique Course Ids
DataView distView = new DataView(table);
DataTable distinctValuesDt = distView.ToTable(true, "Column1", "Column2" ...);
  1. Run a .Select by looping through the course IDs in the DistinctValuesDt DataTable to get the list of students for each course or use Filter Datable Activity

I hope this is what you are looking for.

Regards,
Nithin

2 Likes

Hi @m.alem1
Do you want to input data in datatable to your webapplication?
you can using [For Each Row] to do that.

You can refer as below for guideline:
InputDataFromDatatable.zip (21.0 KB)

I hope it will be useful to you :blush:

1 Like