I read data from excel sheet using C#.
Here is my code and it is working.
var fileName = @"C:\Users\yohan\Desktop\Brandix\y.xlsx";
var connectionString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0; data source= {0}; Extended Properties=Excel 12.0;", fileName);
var adapter = new OleDbDataAdapter("SELECT * FROM [BOM$]", connectionString);
var ds = new DataSet();
adapter.Fill(ds);
DataTable data = ds.Tables[0];
But it always skip the top row of the excel sheet why is that ? Please help ...!!
Thank You yohan