OleDBConnection.Open() blocks with 100% CPU

A

Alexander Pachwald

Hi!

I create a database connection to an Excel 2007 .xlsx file using the
following connection string:

string cs = "Provider=Microsoft.ACE.OLEDB.12.0;" +
"Data Source=" + filename +
";Extended Properties=\"Excel 12.0;HDR=YES\";";

After instantiating an OleDbConnection, I call connection.Open().

This all works fine for a simple Excel file with three sheets, two of them
empty. A more complex version with eight filled sheets (no calculation on
them!) makes the Connection.Open() command block using 100% CPU. When I
execute the code while the file is opened in Excel 2007, everything works
fine.

Any suggestions?

Thanks for your attention,
Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top