Im getting this error when connecting Excel in ODBC:
System.Data.Odbc.OdbcException occurred
HResult=0x80131937
Message=ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Source=
StackTrace:
<Cannot evaluate the exception stack trace>
This is my code:
string ConnectionString = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=" + path + ";";
OdbcConnection cnn = new OdbcConnection();
cnn.ConnectionString = ConnectionString;
cnn.Open();
I have installed this driver.