Here's my code which is in the beginning of a method for converting .xls file to .csv.
sourceFile="C:\\Users\\myUser\\Desktop\\Folder\\myFile.xls";
string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + sourceFile + ";Extended Properties=\"Excel 8.0;HDR=No;IMEX=1\"";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
And it crashes on the last line, throwing this exception: Unexpected error from external database driver (22).
I tried removing the IMEX=1 part, but it still didn't work.
What is the problem?