Using Windows 7 64 Bit OS, ASP.NET. When trying to read an excel file, It gives an error - 'Could not find installable ISAM'.
I tried to install AccessDatabaseEngineX64 but it said, the Office 2007 has 32 bit components, so went ahead & installed AccessDatabaseEngineX86. I also changed the Platform to 'X86' from 'Any CPU'. The issue persits. How can I fix it.
string fileName = fileUploadExcel.PostedFile.FileName;
string fileType = Path.GetExtension(fileName);
string filePath = "~/Temp/"+fileName;
FileUploadExcel.SaveAs(Server.MapPath(filePath));
string connString ="";
if(fileType==".xls")
connString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;DataSource={0};Extended Properties = \"Excel 8.0;HDR=Yes;IMEX=2\";",filePath);
else if(fileType==".xlsx")
connString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;DataSource={0};Extended Properties = \"Excel 12.0;HDR=Yes;IMEX=2\";",filePath);
DataTable dt = new DataTable();
OleDbConnection conn = new OleDbConnection(connString);
conn.Open; //Error Here