Transposing a list to columns 6 lines at a time

I am new to uipath and have searched the forums but could not find an elegant solution. I have a list and would like to transpose 6 rows at a time into columns.

Example data would look like this
a1
b1
c1
d1
e1
f1
a2
b2
c2
d2
e2
f2

Result:
a1 b1 c1 d1 e1 f1
a2 b2 c2 d2 e2 f2

Any help would be greatly appreciated.

You can achieve this just by keeping track of the row and column indexes on your target DataTable.

So you add the values by column, skipping to a new row when col index 6 is reached.

Here is an example:

Main.xaml (10.7 KB)