OleDbConnection ExclConn = new OleDbConnection(); // HDR = YES get header; Extended Properties = text parsing a text file ExclConn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + dir + ";" + "Extended Properties=\"text;HDR=Yes;FMT=Delimited\""; //Open the Excel File string Exceldata = "SELECT * FROM [" + FileName + "]"; OleDbDataAdapter dtadpt = new OleDbDataAdapter(Exceldata, ExclConn); //Create table dtadpt.Fill(dt);
[FieldConverter(ConverterKind.Date, "ddMMyyyy")]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)