How can i write excel with data array

I am having some data in data array variable “system.data.datarow” how can i write this data into excel file

@thangapandian, convert it to a data table

DataRow[*].CopyToDatatable

Regards,
Dominic :slight_smile:

3 Likes

thank you

Hi @Dominic,

my problem is that I have a DataTable which contains all the data in excel sheet so I want to convert it to DataRow[], is this possible?Please help

HI @siahVudu,
you can use like “dtTable.Select()” . It will return the datarow array.

Regards
Balamurugan

1 Like

Thank you so much for quick reply,it worked:slightly_smiling_face:

Alongwith balu’s solution, dt.AsEnumerable() can also be used.

Edit: Remember that above will return System.Data.EnumerbaleRowCollection(of System.Data.DataRow). .ToArray is essential to be converted into Datarow array

@Dominic,Thank you that also works

exactly how to implement it.
I am using assign activity.
@Dominic