Could not find installable ISAM

前端 未结 7 1781
Happy的楠姐
Happy的楠姐 2020-11-28 15:52

I have the following code :

string excelConnectionString = @\"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\db\\suc.xls; Extended Properties=\"\"Excel 1         


        
7条回答
  •  被撕碎了的回忆
    2020-11-28 16:22

    I had the same kind of problem. I was using an Excel 2010 database. But I had a xlsx file instead of xls. I solved my problem using the connection string as fallows,

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=logbook.xlsx;Extended Properties='Excel 12.0;HDR=YES;IMEX=1;';

    What I was missing are, I used OLEDB.4.0 instead of ACE.12.0 . I tried using ACE.14.0. But it didn't work either. Then I missed inverted commas ( ' ' ) around Extended Properties.

    Sorry if the answer is hard to read, I am uploading this in my phone.

提交回复
热议问题