My task is to take an Access Database and create an Excel file, but I can not seem to CREATE the Excel file that OleDb will use.
The Excel file name
I found a working solution, just remove IMEX parameter like this :
string connString = String.Format(
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};" +
"Extended Properties=\"Excel 8.0;HDR={1}\"",
file,
(containsHeader ? "Yes" : "No")
);
When I tried Excel 12.0, it creates a file but I cannot open it in Excel Application.
Anyway, this stuff works for XLS files.