How to pass last row of excel file as a header row.
In addition to it that last row will be always dynamic one.
i have used add data row to get the header row name but its adding into the last line of the datatable. But i want to add the data as initial row as header @Palaniyappan@other forum persons as well
Thanking you in anticipation
loop over the columns of datatable, then for each column assign last dataRow value to become the header by doing dt.Columns(col.ColumnName).ColumnName = dt.Rows(dt.Rows.Count-1)(col.ColumnName).ToString
Hai @jack.chan … I referred your code but i didn’t get last row value as header, u assigned last row value as header but didn’t pass the value to data table
kindly let me know how to pass last row value as header in excel file.