Want to loop through the data table using datacolumn property

Hi Team,

I want to know how to iterate the datatable using DataColumn property

Current I am reading an excel using for each row and Get row item. DTcolumn is declared but the message box displays only first item in each row. How to make sure to display the column name we wish. Please clarify.

image

image

Thanks,
Ula

columnArr=datatable.Rows(0).ItemArray.ToArray()

This will convert first row of a datatable to array. Then you can iterate it using array variable.

Hi kadiravan,

Thank you for your suggestion but I want to read the data using data column property. Also the above condition gives validation error. Could you please let me know about that?

Thanks,
Ula

can you give me sample excel file and in which how you want to iterate the data.