//Fetch the location of CSV file string filePath = Server.MapPath("UploadedCSVFiles") + "\\"; string strSql = "SELECT * FROM [" + fileInfo.Name + "]"; string strCSVConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";" + "Extended Properties='text;HDR=YES;'"; // load the data from CSV to DataTable OleDbDataAdapter adapter = new OleDbDataAdapter(strSql, strCSVConnString); DataTable dtCSV = new DataTable(); DataTable dtSchema = new DataTable(); adapter.FillSchema(dtCSV, SchemaType.Mapped); adapter.Fill(dtCSV);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)