List (collection) to datarow

I’ve been searching for a couple of days now but can’t find the solution to this.

The process builds a recurring collection of a fixed amount of strings (10).

My goal is to add the data (string) in the collection to a datatable, the strings should be a datarow spanning over the fixed colums.

Thanks in advance

Hi,

First you have to consider that your datatable will first need to the correct column mapping (amount and type).
In your case, you will need 10 columns of type “String”.

You can achieve the simplest way using the Build datatable activity.

image

Then you can simple drag a ‘Add Data Row activity’ where you can pass your List(Of String) adding .ToArray Afterward, specifying your datatable as property too.

image

Cheers

1 Like