string Filepath = Server.MapPath("Documents") + "\\" + System.DateTime.Now.ToString("dd_MM_yyyy_mm_ss_") + fupFile.FileName; fupFile.SaveAs(Filepath); if (FileExt == ".xls") { sExcelConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Filepath + ";Extended Properties=\"Excel 8.0;HDR=YES;IMEX=1;\""; } else if (FileExt == ".xlsx") { sExcelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Filepath + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES;IMEX=1;\""; } else { sExcelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Filepath + ";Extended Properties=\"text;HDR=YES;FMT=Delimited\""; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)