Fill a Dictionary from concatenated Data Table rows

Hello Everyone,

I couldn’t find a better title for this topic, If you have one more accurate feel free to suggest it.

Here is my concern,
I have as Input an excel file that contains product references, I imported as Data Table.

  1. I would like to concatenate the references by group of 50 in one String. (Let’s assume I have 186 rows, I would need 4 Strings 350+136)

  2. I would like to put those Strings in one Dictionary or in a Data table of 4 rows.

Please refer to the picture attached. Thank you for you support

Hi @Sofian15,
First of all, read the Excel to a dataTable using read range activity. Here you’ll get all Excel data in dataTable - dtExcel

Declare a integer variable say i=0 and a string variable say line=" "
And declare a dataTable dtOut

For each row in dtExcel
If(NOT i<50){
Add line to dataTable using add DataRow activity
line= " "

After for each,
If (line.length>0)
Add line to dataTable using add DataRow activity
(For adding the remaining data)



Hope the following helps you. (15.9 KB)


1 Like

Hello ,
Thank you Yoichi !
It is perfectly working !

Thank you again


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