How to insert string value into a datatable column

I need to write my string values in a single row with 10 columns into a datatable. Is it possible

1 Like

Fine
we can use ADD DATA ROW ACTIVITY for that
where pass the string as array like his
{“value1”,“value2”,“value3”,…}
and in the datatable property mention the datatable name

Cheers @RachelN

Add data row inserts row right

I want to write as columns

image

I want to write AAA BBB like this for the dynamic header

1 Like

yah this way of sending actually does that
like value1 will be placed in first column
value2 will be placed in second column
value3 will be placed in third column
…

it places dynamically
even we can pass the variable as array in the array row where each variable in the array will be assigned to the corresponding columns
{variable.ToString,variable2.ToString,…,variable10.ToString}

Cheers @RachelN

But am using for each row. So each time i will get only one data like variable1.

So when i passed {variable1} in data row.

at end it is displaying as

AAA
BBB
CCC

@Palaniyappan

1 Like

Fine got it
inside that for each row loop use a ADD TO COLLECTIONS activity
where in the property panel
for collections mention as list_input
for items mention as row(“yourcolumnname”).ToString
and in type argument mention as String

–so list_input is a variable of type system.collections.generic.List(of string) with default value as new list(of string) defined inthe variable panel

–so keeping this list variable inside the for each row loop will add all the values to the collection that is to this list variable
–now after this for each row loop use a ADD DATAROW activity where in the arrayrow mention this list variable like this list_input.ToArray()

Cheers @RachelN