Add Array to Datatable

I have a list of string and I want to add it at the top of a datatable, means at index 0. How can I do this?

Hi @Rajat_Hedaoo ,

Could you maybe try Checking the post below :


you can add your array like this

yourList.Select(Function(n) cobj(n)).ToArray()

and then swap your row position with this


Hi @supermanPunch,

How to convert list of string to DataRow object for passing as argument in the invoke method activity which you have used?


@Rajat_Hedaoo ,
Apologies. It seems the workflow only adds an Empty row in the datatable at the required position.

We could add the data by creating a new DataRow variable and assigning the list value to it and then performing the setting up of the row in the first position.

Check the updated workflow below : (2.8 KB)