@Venkatesh_Chowdary, Refer this,
Hi @Venkatesh_Chowdary ,
Use add data row to add the data array into datatable.
Use for each to loop through the array of data row. And add the data into datatable.
I want to ask you the opposite. I want to create array of strings for each row in Excel datatable and could not find appropriate post for it. Could you please help ?
Read Excel Sheet and store it in a datatable dta
Now create a Variable ABC which is of datatype List(Of List(Of Strings))
ABC = (From p In dta.Select Select p.ItemArray.ToList).ToList
p represents each row of datatable dta
and we are converting each row to a list of strings.
So ABC is List of List of strings.
So if you access ABC(0) you will get a list of strings which is of row 0.
.copytodatatable() throws error for me
What is the error when you hover over the blue exclamation mark?