User136609187 posted
I have an excel sheet in below format.While populating this in to datatable i want to take column names from the second row.
Product Details and Location Details are merged columns that comes as first row and all column the names starts from second row
Am using oledb connection to open excel and fill data table .
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Files\Productdetails.xlsx;Extended Properties="Excel 12.0;";
Tried using HDR=No in the above connection string but it didnt help.
Below is my sample excel data
Product Details |
Location Details |
ProductID |
Product Name |
Product Category |
Brand |
Country |
State |
City |
Location |
P221 |
D Link-DSL 2 |
Router |
Dlink |
India |
Maharashtra |
Mumbai |
Andheri |
PB3419 |
D Link-DIR |
Wifi Router |
Dlink |
India |
Maharashtra |
Mumbai |
Bandra |
Please help me to resolve this .