How can i create an array of Datatables and loop through it?



I would like to create and loop through an array of Datatables (unknown number in each execution) and invoke a specific process which finds the sum of certain columns.

Could you please guide me in that/?




For each row?


How i can i create the array of datatables in order to use For each row?



Which database you mean here? SQL Database?


No, i am reading 5-8 csv files and creating datatables. Then i want to invoke the same process for all those datatables created


In that case you can use Directory.GetFiles(“FolderPath”,“File Extension”), this will give you an array then you can apply for each loop on it and perform operations on each file


Goto Variables panel —> Goto your variable —> variable type select Array of [T] -->select Browse for types, then search for DataTable


Initialize a list of datatables and for each csv file read range and add to collection. Then you can simply loop through the list.


Thanks bala! and how can i assign the datatables to the array dynamically?

#10 I think this should help you


Use “Add to Collection” Activity