I am trying to use the OleDb connection to fill a data table with data from an excel file, however I am receiving the following error: "Could not find installable ISAM".
Any help would be much appreciated.
I have tried the advice from other similar error posts to no avail.
string cnStr = @"Provider=Microsoft.ACE.OLEDB.12.0;'C:\Users\Nick\Documents\Visual Studio 2010\Projects\ExcelTest1\ExcelTest1\CapitalPlan.xlsx';Extended Properties=" + "\"Excel 12.0 Xml;HDR=YES;IMEX=1\"";
DataTable dt = new DataTable();
`string sql = "Select * From [Sheet1$]";`
`using (OleDbConnection cn = new OleDbConnection(cnStr))
{
using (OleDbDataAdapter adapter = new OleDbDataAdapter(sql, cn))
{
adapter.Fill(dt);
}
}`