none
Could not find installable ISAM.

    Question

  • I got the "Could Not  find installable ISAM error" while uploading an Excel file in my application.  The connection string uses the Microsoft.Jet.OLEDB.4.0 provider with following parameters Provider=Microsoft.Jet.OLEDB.4.0;Excel 8.0;
    Extended Properties=HDR=No; IMEX=1.

     I checked the registry entries  as mentioned in the "Retrieving Data from Excell 2003-Could Not Find installable ISAM" post and even registered the "Msexcl40.dll" again. Even then I got the "Could Not  find installable ISAM error". So I restarted the IIS Server. Even then the problem persists. What else could be the problem? 

     

    Thanks and Regards,

    Little


    Thursday, October 12, 2006 8:17 AM

Answers


  • This error will also be generated when the syntax of the connection string is incorrect. This commonly occurs when using multiple Extended Properties parameters. Below is an example:

    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=e:\My Documents\Book20.xls;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""

    Thursday, October 12, 2006 12:13 PM
  • copy the below code to a buton click event. then change the path for you mdb and xls.

    it will work..100%.....................

     

    Dim DBImportConn As New OleDbConnection

    Dim DBImportCmd As New OleDbCommand

    Dim DBImportReader As OleDbDataReader

    Dim ImpAccessData As Access.Application

    Dim FilePath As String

     

    If File.Exists(Application.StartupPath & "\Database\PatientData.mdb") Then

    File.Delete(Application.StartupPath & "\Database\PatientData.mdb")

    End If

     

    ImpAccessData = New Access.ApplicationClass

    ImpAccessData.Visible = False

    ImpAccessData.NewCurrentDatabase(Application.StartupPath & "\Database\PatientData.mdb")

    ImpAccessData.CloseCurrentDatabase()

    ImpAccessData.Quit(Access.AcQuitOption.acQuitSaveAll)

    ImpAccessData = Nothing

    FilePath = Txt_FilePath.Text

    If DBImportConn.State = ConnectionState.Open Then DBImportConn.Close()

    DBImportConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FilePath & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";")

    DBImportConn.Open()

     

    DBImportCmd = DBImportConn.CreateCommand

    DBImportCmd.CommandText = "SELECT * INTO [MS Access;Database=" & Application.StartupPath & "\Database\PatientData.mdb" & "].[Sheet1] FROM [Sheet1$]"

    DBImportCmd.ExecuteNonQuery()

    DBImportConn.Close()

     

    Saturday, October 18, 2008 9:56 PM
  • "ExtendedProperties" needs to have a space between "Extended" and "Properties":  "Extended Properties=..."

    Wednesday, October 22, 2008 7:32 PM

  • Are you certain these are true Excel Workbook files? For example, if you open the file in Excel, perform a Save As to a new file (using the Workbook XLS format) and then open that file using the code, do you still encounter the error? Are there any objects embedded in the Workbook?

    I'm not aware of any issues opening an 11.0 version file using the Jet 4.0 OLEDB Provider.

    Wednesday, January 31, 2007 8:07 PM

  • It looks like Microsoft disabled the Access to Excel linking technology in Office 2003 SP2 because of a court decision based upon a long running patent infringement lawsuit:

    http://news.com.com/Patent+ruling+costs+Microsoft+8.9+million/2100-1007_3-5735432.html
    http://support.microsoft.com/?id=904953

    Unfortunately, the method they chose to do this (which is rather cheesy if you ask me) also broke the data access technology which relies on the same ISAM driver method. They have configured Microsoft Access to update the ISAM reference to point to the expression evaluator library (which of course is invalid when using the Jet library).

    I will check to see if there is a workaround for this. You could probably create a simple script that changes the registry entry to enable data access support for Excel but that may not be the best solution.

     

    Tuesday, March 13, 2007 5:03 PM

All replies


  • This error will also be generated when the syntax of the connection string is incorrect. This commonly occurs when using multiple Extended Properties parameters. Below is an example:

    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=e:\My Documents\Book20.xls;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""

    Thursday, October 12, 2006 12:13 PM
  • If the dll's are registered properly and the connection string is in proper format but both providers Micosoft.Jet.oledb Versions 4.0 and 3.51 are present on the Server could this cause the problem.

    Thanks and Regards,

    Little

    Monday, October 16, 2006 7:10 AM

  • You can have multiple versions of the Jet OLEDB provider installed. Could you post the exact syntax of your connection string?
    Monday, October 16, 2006 12:04 PM
  • The connection string is of the format:

    "Provider=Microsoft.Jet.OLEDB.4.0;Excel 8.0; Extended Properties=HDR=No; IMEX=1;Data Source=" & App.Path & "\..\Upload " & "ExcelFileName & ".xls"

    where ExcelFileName is the name of the Excel file.

    Thanks & Regards,

    Little

    Tuesday, October 17, 2006 5:20 AM

  • I see some problems with the syntax. Try the following instead:

    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" App.Path & "\..\Upload" & ExcelFileName & ".xls" & ";Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""

    I'm assuming your data source is correct, although I can't tell by looking at your connection string whether ExcelFileName is preceded by a back slash. In any event, the Extended Properties argument would not be evaluated properly in the example you posted.

    Tuesday, October 17, 2006 11:54 AM
  • The ExcelFileName in the connection string contains the backslash and the excel filename.

    The connection string posted by me does not cause any trouble in the development server but causes error "Cannot find installable ISAM" in the uat server where some service packs and hotfixes have been installed. Right now I don't know which ones. But I found that the version of the "Msjet40.dll" in development server is "4.0.8618.0" while that in uat server is "4.0.9025.0". Can this cause the problem?

    Thanks and Regards,

    Little

    Thursday, October 19, 2006 5:02 AM

  • OK, well I copied and pasted the connection string you posted and can't execute it because there is a syntax error, so you must be using something that's different.

    Assuming that it runs fine on one system and not another I would say that you definitely have a configuration problem with respect to Jet and the Excel ISAM driver. What account did you log on to the server with when you re-registered the Excel ISAM driver?

    Thursday, October 19, 2006 12:03 PM
  • Logged in as the Server administrator and re-registered the "msexcl40.dll". Will reinstalling MDAC 2.8 help?

    Thanks and Regards,

    Little

    Thursday, October 19, 2006 12:35 PM

  • Which version of the Windows OS are you using?
    Thursday, October 19, 2006 12:49 PM
  • We are using Windows 2000 Server SP4 Update RollUp1 , MDAC version 2.8 and the Microsoft Jet 4.0 Database Engine that comes with SP4 Update RollUp1.

    We tried reinstalling MDAC and restarted the Server. But that doesn't solve the problem.

    Thanks and Regards,

    Little

    Friday, October 20, 2006 7:13 AM

  • The Excel ISAM is actually intalled with Jet so I wouldn't expect an MDAC fix to resolve the issue.

    Have you checked for multiple versions of Msexcl40.dll? I believe the version that your installation should be using is 4.0.9025.0.

    Friday, October 20, 2006 12:05 PM
  • The version of Msexcl40.dll is 4.0.9025.0. Will reinstalling the Jet component make a difference?

    Thanks & Regards,

    Little

    Tuesday, October 24, 2006 4:13 AM

  • If you can back out the update rollup you can try re-installing. Otherwise it may tell you that the latest version is already installed.

    I seem to recall there was a way to resolve this issue through an Office install fix as well, but I'm assuming that you don't have Office installed on this machine.

    Tuesday, October 24, 2006 12:33 PM
  • Office is not installed on this machine. If Office was present on the machine and uninstalled could this cause the problem.

    Is there any other way to read an Excel file besides using the Microsoft.Jet.OLEDB.4.0 provider?

    Thanks and Regards,

    Little

    Thursday, October 26, 2006 4:27 AM

  • There is an option in the Microsoft Office setup to install the ISAM database drivers. If I remember correctly, by default it's disabled, but this is an option for installing the drivers. 

    If Office is installed I believe the fix is to use the repair option (Control Panel...Add/Remove Programs...Microsoft Office...) if there is a problem with the ISAM drivers.

    You could also try the Excel ODBC driver if it is installed. You can verify whether it is installed using the Data Sources (ODBC) applet under Administrative Tools in Control Panel.

    For the Excel ODBC driver you would need to use the .NET ODBC namespace instead of .NET OLEDB. You can find a connection string example at http://www.connectionstrings.com.

     

    Thursday, October 26, 2006 12:13 PM
  • I am using Microsoft.Jet.OLEDB.4.0 Provider within a VB dll to read an excel file and convert it into an xml file that is used for data upload. Is there any other way to read an excel file in VB and ASP.

     

    Thanks & Regards,

    Little

    Monday, October 30, 2006 4:29 AM

  • The Microsoft Jet OLEDB Provider only supports the Excel ISAM. As I mentioned in my previous post you can use the Excel ODBC driver but you would need to switch to the .NET ODBC library. 
    Monday, October 30, 2006 1:17 PM
  • Hi, I am having the same maddening problem (currently prototyping on my personal machine) and it seems I have all the proper dll set-up, and I have tried so many different versions of the string it's unbelievable!  Here's what I currently have...is there some sort of different format needed when coding in C#?

     

    ("Provider=Microsoft.Jet.OleDb.4.0;data source=C:\\ExportTest.xls;Extended Properties=Excel 8.0;HDR=Yes;");

    Wednesday, January 31, 2007 6:45 PM

  • Couple of ways to handle the syntax problem. Below is one method:

    ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +

    "Data Source=C:\\ExportTest.xls;" +

    "Extended Properties=" + (char)34 + "Excel 8.0;HDR=Yes;" + (char)34;

    Wednesday, January 31, 2007 6:56 PM
  • Thanks much for your reply...I used this:

    OleDbConnection dbConnection = new OleDbConnection();

    dbConnection="Provider=Microsoft.Jet.OLEDB.4.0;" +

    "Data Source=C:\\ExportTest.xls;" +

    "Extended Properties=" +

    (char)34 +

    "Excel 8.0;HDR=Yes;" + (char)34;

    And then I get this error:  (pointing to the first of the '+' signs):

    Error 1 Cannot implicitly convert type 'string' to 'System.Data.OleDb.OleDbConnection' C:\Visual Studio 2005\WebSites\Import_Export_Test\Import.aspx.cs 72 38 C:\...\Import_Export_Test\

    I am rather new to .Net after a 3 year hiatus, coming from good ol' ASP...but this is really frustrating...it's not all this picky, is it? 

    Wednesday, January 31, 2007 7:09 PM

  • dbConnection is defined as an OleDbConnection object and not a string. You need to assign the connection string value to the ConnectionString property of this object:

    dbConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;" +

    "Data Source=C:\\ExportTest.xls;" +

    "Extended Properties=" +

    (char)34 +

    "Excel 8.0;HDR=Yes;" + (char)34;

    Wednesday, January 31, 2007 7:23 PM
  • Yes, thanks!  And now, I get this:

     

    External table is not in the expected format.

     

    Could it be that we have Excel 11.x version?

    Wednesday, January 31, 2007 7:29 PM

  • Are you certain these are true Excel Workbook files? For example, if you open the file in Excel, perform a Save As to a new file (using the Workbook XLS format) and then open that file using the code, do you still encounter the error? Are there any objects embedded in the Workbook?

    I'm not aware of any issues opening an 11.0 version file using the Jet 4.0 OLEDB Provider.

    Wednesday, January 31, 2007 8:07 PM
  • Yes, thank you.  I found in a different post that very issue, we will have to ensure our users 'Save As' to Excel prior to importing, because the Export actually ends up putting the file in HTM. format.

     

    Thanks!

    Wednesday, January 31, 2007 8:11 PM
  • Hi Clement,

    I have gone through all your replies related to this issue and I am able to solve mine. Thanks a lot.

    One interesting issue I observed in my system is that I have two entries under HKLM\Software\Microsoft\Jet\4.0\Engines\Excel, which are Win32 and Win32old. Win32old is pointing to C:\WINDOWS\system32\msexcl40.dll, whereas Win32 is pointing to C:\Program Files\Microsoft Office\OFFICE11\msaexp30.dll. Out of curiosity, what diffrence does these two have?

    I have another issue related to this and I though you would be the right person to ask...

    In the excel I am trying to read has a listbox with states & counties listed. Based on the selection, when we run a macro, some of the values in other sheets are going to get changed. I need to pass desired state & county from my asp.net (C#) page and then collect the updated information in the other pages after running the macro. My main problem is how to access or pass values to excel list box?

    Thanks & your help is very much appreciated.

    Murali Krishna K

    Thursday, February 08, 2007 5:46 PM

  • Msexcl40.dll and msaexp30.dll are two different files that perform different functions. Msaexp30.dll is the Microsoft Expression Evaluator and doesn't really have anything to do with accessing an Excel Workbook.

    I'm not sure if I understand your second question. Web applications don't typically interact with desktop applications, such as Excel, unless they are running client side script (e.g. JavaScript, VBScript, etc.). Are you actually trying to plug values into an Excel Workbook, running on the desktop, from an ASP.NET application?

    Thursday, February 08, 2007 9:00 PM
  • Paul:

    I am experiencing a similar problem. Here is a copy of part of my post on Experts Exchange:

    I have been working on this for 8+ hours. It should be simple and I can't get it to work. I am trying to connect to an uploaded Excel file using a Microsoft Excel driver.

    For MANY hours I was receiving the following error:

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver]General error Unable to open
    registry key 'Temporary (volatile) Jet DSN for process 0x9ac Thread 0xa0c
    DBC 0x15d1024 Jet'.

    I looked through dozens of links and finally ran across one that mentioned checking the registry for:

    HKEY_LOCAL_MACHINE -> SOFTWARE -> MICROSOFT -> JET -> 4.0 -> ENGINES -> EXCEL

    There was an entry called win32 which contained: C:\Program Files\Microsoft Office\OFFICE11\msaexp30.dll

    There was an entry called win32old which contained:
    C:\WINDOWS\system32\msexcl40.dll

    I installed MS Access 2003 on this web server about a year ago and I have a feeling that is when the new entry was created and the win32 was renamed to win32 old.  Taking the corrective action of reassigning win32 to C:\WINDOWS\system32\msexcl40.dll allowed me to progress and get the next error.

    I have done some additional tracking of this issue.

    When  I change the registry to the msexcl40.dll value and attempt to start Access on the server, it goes through a brief Access installation process and resets the value of the registry to msaexp30.dll. After this happens, my Excel text driver stops working again.

    The problem is narrowed down quite a bit and it looks like I might need some high level help to resolve what I am considering to be a bug.

    Thoughts?
    Saturday, March 10, 2007 4:59 PM

  • Can you post an example of the connection string you are using?

    Tuesday, March 13, 2007 2:18 AM
  • Paul:

    Thanks for finding this thread again :)

    I have probably tried 15 different connection strings. None work as long as the registry value of msaexp30.dll is used. When I replace the value with msaexcl40.dll almost every connection string works.

    Both of these connection strings works as long as the msaexcl40.dll value is in the registry.

    objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strFilePath & ";" & "Extended Properties=""Excel 8.0;HDR=No;ImportMixedTypes=Text;IMEX=1"""

    'objConn.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ="&strFilePath&";"

    Again, the msaexp30.dll appears to have been installed when I installed Access 2003 on the server. It also replaces the msaexl40.dll value every time I open an Access file on the server (via remote desktop).

    Right now I am changing the registry value back every time I open Access on the server. This is quite inconvenient as I need to open an Access file regularly on the server.




    Tuesday, March 13, 2007 3:34 PM

  • It looks like Microsoft disabled the Access to Excel linking technology in Office 2003 SP2 because of a court decision based upon a long running patent infringement lawsuit:

    http://news.com.com/Patent+ruling+costs+Microsoft+8.9+million/2100-1007_3-5735432.html
    http://support.microsoft.com/?id=904953

    Unfortunately, the method they chose to do this (which is rather cheesy if you ask me) also broke the data access technology which relies on the same ISAM driver method. They have configured Microsoft Access to update the ISAM reference to point to the expression evaluator library (which of course is invalid when using the Jet library).

    I will check to see if there is a workaround for this. You could probably create a simple script that changes the registry entry to enable data access support for Excel but that may not be the best solution.

     

    Tuesday, March 13, 2007 5:03 PM
  • Paul:

    Yes, I ran across those links in my hours of research. I wondered if that might be the case. I do have Access 2003 SP2 installed on the server. I do have access to Access 2007, but don't relish uploading such a new product (never mind uploading the several hundred MB installation file _again_).

    Let me know if you find a workaround.

    It looks like I'll be researching the script idea. I'm betting that I can't update the registry via Classic ASP...or if I could I would be opening a pretty big security hole.

    Thanks for your post.
    Tuesday, March 13, 2007 7:32 PM

  • Ouch. Yeah if the app is Classic ASP I could see how this would be a problem.

    Oddly enough I don't see the behavior you described with Office 2007. The ISAM reference in the Registry is correct and does not need to be changed.

    I'll have to check Office 2003 SP2 to see what's going on. AFAIK, the ADO/Jet/Excel ISAM functionality should not be disabled. As a matter of fact you should still be able to link to Excel Worksheets through Access, but not update them (as the MS KB article stated).

     

    Tuesday, March 13, 2007 8:26 PM
  • Any follow-up on this because I have the same problem and can't find any solution?

     

    Friday, September 21, 2007 2:29 AM
  • hello clement,

    i got the same error,but in my project i used to open two excel files with the help of oledb.jet 4.0

    i got that "Could not find installable ISAM.microsoft jet database engine" error when i used to open first

    connection it dnt shows any error but when i open the consecutive connection  it shows the above error

    why i got like that.my code is like that

     

    Excel.Application App1;

    Excel.Workbook WB;

    Excel.Workbooks WB1;

    Excel.Range Rng;

    Excel.Sheets Sht;

    Excel.Worksheet Wsheet;

    App1=null;

    WB=null;

    WB1=null;

    Sht=null;

    Wsheet=null;

    Object objOpt=System.Reflection.Missing.Value;

    Object Exc=Name2;

    App1=new Excel.Application();

    WB1=(Excel.Workbooks)App1.Workbooks;

    WB = (Excel.Workbook)(WB1.Add(objOpt));

    Sht=(Excel.Sheets)WB.Worksheets;

    Wsheet = (Excel.Worksheet)(Sht.get_Item(1));

    // It dnt shows error

    string Connectionstring=@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + txtFile1.Text.Trim() + ";Extended _Properties=\"Excel 8.0;HDR=NO;\"";

    OleDbConnection conn=new OleDbConnection(Connectionstring);

    conn.Open();

    string cmnd="select * from [Sheet1$]";

    OleDbCommand cmd=new OleDbCommand(cmnd,conn);

    OleDbDataAdapter adap=new OleDbDataAdapter();

    OleDbDataReader reader;

    reader=cmd.ExecuteReader();

     

    string connectionstring1=@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + txtFile2.Text.Trim() + ";Extended _Properties=\"Excel8.0;HDR=NO\"";

    Properties=Excel8.0;";

    OleDbConnection conn1=new OleDbConnection(connectionstring1);

    if(conn1.State!=ConnectionState.Open)

    //In that line wehn i open a connection it shows error "Could not find installable ISAM.microsoft jet database engine"

    conn1.Open();

     

    Thursday, September 27, 2007 8:48 AM
  • hello friends,

    sorry for my previous post i found that there was an error in the connection string ie excel8.0 instead of excel 8.0

    that make the problem.

    Regards

    Prathap

     

    Thursday, September 27, 2007 12:04 PM
  • Hi Paul and other friends,

     

    My problem is a bit different from what you guys have posted above. But I get the same error and while searching in google got the above chain.

     

    First of all, I am using Access 2003. The connection string is the same one which Paul mentioned in earlier posts. The only difference is I use a .MDB file instead of a .XLS file.

    In my web application, when I try to read the data from the db, I do not face any problem. But when I try to INSERT some data it gives me "Could not find installable ISAM". The only difference between Reading connection string and Writing connection string is "ReadOnly=1". Please help me if you guys know about this. Thanks in advance.

     

    Regards,

    Sharmin Jose

    Thursday, October 18, 2007 11:53 AM
  •  

    hello guys....i v got a similar problem. In my case im trying to upload data from an excell into SQL2000 but then there's a catch....it works fine in 3 machines but this through the 'installable' error for 6 other machines. In some machines this can be fixe by placing the excell in the root directory ...i.e wwwroot or project folder, but you cant expect the clint to do so for each excell he uploads......so i am pretty much stuck at this......any help is appreciated...thanks in advance guys.......
    Monday, December 10, 2007 8:10 AM
  • While defining the Extended property , if the parameter is more than one, then please keep all the parameter inthe quote(in case of C#);
    e.g
     strConnectionString =@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strDirName+"\\"+strFileName+";Extended Properties='Excel 8.0;HDR=NO'";

     

     

    I hope that wil solve your problem

    Wednesday, January 09, 2008 6:40 AM
  • Thanks for the reply.......but what worked fo me is the one below :

     

    @"provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strPath+";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";

     

    I dunno how but it worked, and what idid not work  was

    @"provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strPath+";Extended Properties=Excel 8.0;HDR=NO;IMEX=1";

     

    But then there lies another complication, why in the world did the second link work on some pc's and not on some other......

    • Proposed as answer by Nithya_nits Thursday, September 10, 2009 5:05 AM
    Wednesday, January 09, 2008 10:31 AM
  • I had this "Could not find installable ISAM" error and found that it was being thrown when I supplied some extended properties to the provider string. I found the problem to occur only when supplying HDR or IMEX extended properties (as defined at http://www.connectionstrings.com/?carrier=excel).

     

    My goal was to retrieve an Excel 2003 worksheet into SQL 2005 Express using SQL Server Management Studio Express. A quick point to note is that Ad Hoc Queries are disabled by default, that means the OPENROWSET doesn't work by default unless the server is reconfigured, hence what I'm doing before and after the query.

     

    Code Snippet

    sp_configure 'Show Advanced Options', 1;

    RECONFIGURE

    sp_configure 'Ad Hoc Distributed Queries', 1;

    RECONFIGURE

     

    SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',

    'Excel 8.0;HDR=No;IMEX=1;Database=C:\SpreadSheet1.xls',

    [Sheet1$])

     

    sp_configure 'Show Advanced Options', 0;

    RECONFIGURE

    sp_configure 'Ad Hoc Distributed Queries', 0;

    RECONFIGURE

     

     

    Notice that there is no mention of "Extended Properties=", which seemed to be causing the issue!

     

    Hope that helps,

    Wednesday, February 27, 2008 12:20 AM
  • It is because of multiple extended properties. Use something like:

     

    For c#:

    String sConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +

    "Data Source=" + fileName + ";Extended Properties=\"Excel 8.0;HDR=NO\"";

     

    Thursday, March 06, 2008 4:00 PM
  • I think most of the times the error refers to a wrong ODBC Connection String:

    a correct template:

    "Provider=Microsoft.Jet.OleDb.4.0;data source=[FILE_PATH];Extended Properties=Excel 8.0;"
    Monday, March 17, 2008 10:47 AM
  •  

    correct the connection stirng or some parameter to remvoe this error.
    Tuesday, July 15, 2008 8:55 AM
  • I am trying to upload the csv file into SQL Server 2008. OS I am using is Vista and Office 2007. It is also giving me ISAM error. I have gone to Administrator Tools and Added ODBC driver into the list but no help. Could you tell me what I need to next?

     

    Here is my code:

    string fileName = DateTime.Today.ToString("yyyyMMdd") + "isolf.csv";

    //StringBuilder path= new StringBuilder();

    Console.WriteLine(fileName);

    //string path = "C:\\Users\\localhost\\Documents\\";

    OleDbConnection DBConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\localhost\\Documents\\" + fileName + ";" + @" Extended Properties=Text;HDR=YES;FMT=Delimited;IMEX=1");

    DBConnection.Open();

    string SQLString = "SELECT * FROM fileName";

    OleDbCommand DBCommand = new OleDbCommand(SQLString, DBConnection);

    IDataReader DBReader = DBCommand.ExecuteReader();

    while (DBReader.Read())

    {

    NYISO_ISOLF ni = new NYISO_ISOLF(); // it is structure object

    ni.Capitl = DBReader.GetValue(1).ToString();

    Console.WriteLine(ni.Capitl);

    Console.ReadLine();

    DBReader.NextResult();

    }

    DBReader.Close();

    DBConnection.Close();

    Thursday, October 09, 2008 3:16 PM
  • The filename does not belong in the connection string - it's specified in the SQL statement. You only need to specify the path where the file is located in the connection string.

     

    Thursday, October 09, 2008 4:45 PM
  • I am getting this error when I test a web page built using Visual Web Developer 2008 Express on Vista.  I am attempting to access data in an Excel spreadsheet.  I have pored over this thread and others trying to see what I might be doing wrong.  I have repaired Outlook and confirmed that the Jet 4.0 dll is present.  I use the code below.  On my web page I display the contents of the cs and ss I am using, they are:

     

    cs:  Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:[path][fn].xls;ExtendedProperties="Excel 8.0;HDR=Yes"

     

    ss:  SELECT * FROM [Sheet1$]

     

    DataSet postSet = new DataSet();

    OleDbConnection conn = new OleDbConnection();

    conn.ConnectionString = cs;

    try

    {

    OleDbCommand cmd = new OleDbCommand(ss, conn);

    try

    {

    OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);

    try

    {

    adapter.Fill(postSet);

    catch (Exception e)

    {

    oleFillMsg = e.Message;

    postSetFilled = false;

    }

    ...

     

    I am going crazy with this thing.

     

    Help!

     

    Thursday, October 09, 2008 7:01 PM
  • Could you post the exact connection string code? Even the smallest error in syntax can cause this error to occur.

    Thursday, October 09, 2008 11:28 PM
  • OK, I simplified my code because I thought that might be the question.  This code gets the exactly the same error.  By the way, l_Error, l_Provider, l_DataSource and l_ExtendedProperties are labels on my web page and gv_Posts is a gridview.

     

    Thanks.

     

    protected void Page_Load(object sender, EventArgs e)

    {

    Boolean gotData = false;

    string ss = "SELECT * FROM [Sheet1$]";

    DataSet postSet = new DataSet();

    string p = "Provider=Microsoft.Jet.OLEDB.4.0;"; //

    string ds = "Data Source=C:\\Users\\Public\\Public Documents\\Statements\\A9358\\A9358D20071215.xls;"; //

    string ep = "ExtendedProperties=\"Excel 8.0;HDR=Yes;\";"; //

    l_Provider.Text = p;

    l_DataSource.Text = ds;

    l_ExtendedProperties.Text = ep;

    try

    {

    OleDbConnection conn = new OleDbConnection();

    conn.ConnectionString = p + ds + ep;

    OleDbCommand cmd = new OleDbCommand(ss, conn);

    OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);

    adapter.Fill(postSet);

    gotData = true;

    }

    catch (Exception err)

    {

    l_Error.Text = err.Message;

    }

    finally

    {

    if (gotData)

    {

    gv_Posts.DataSource = postSet;

    gv_Posts.DataBind();

    }

    }

    }

     

    Friday, October 10, 2008 2:32 AM
  • copy the below code to a buton click event. then change the path for you mdb and xls.

    it will work..100%.....................

     

    Dim DBImportConn As New OleDbConnection

    Dim DBImportCmd As New OleDbCommand

    Dim DBImportReader As OleDbDataReader

    Dim ImpAccessData As Access.Application

    Dim FilePath As String

     

    If File.Exists(Application.StartupPath & "\Database\PatientData.mdb") Then

    File.Delete(Application.StartupPath & "\Database\PatientData.mdb")

    End If

     

    ImpAccessData = New Access.ApplicationClass

    ImpAccessData.Visible = False

    ImpAccessData.NewCurrentDatabase(Application.StartupPath & "\Database\PatientData.mdb")

    ImpAccessData.CloseCurrentDatabase()

    ImpAccessData.Quit(Access.AcQuitOption.acQuitSaveAll)

    ImpAccessData = Nothing

    FilePath = Txt_FilePath.Text

    If DBImportConn.State = ConnectionState.Open Then DBImportConn.Close()

    DBImportConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FilePath & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";")

    DBImportConn.Open()

     

    DBImportCmd = DBImportConn.CreateCommand

    DBImportCmd.CommandText = "SELECT * INTO [MS Access;Database=" & Application.StartupPath & "\Database\PatientData.mdb" & "].[Sheet1] FROM [Sheet1$]"

    DBImportCmd.ExecuteNonQuery()

    DBImportConn.Close()

     

    Saturday, October 18, 2008 9:56 PM
  • "ExtendedProperties" needs to have a space between "Extended" and "Properties":  "Extended Properties=..."

    Wednesday, October 22, 2008 7:32 PM
  • Brilliant!  That was EXACTLY the problem.  How blind I am, I checked that syntax so many times!

     

    Thank you very much!

    Thursday, October 23, 2008 3:35 AM
  • I had the same issue ("could not find installable ISAM") in my application and I tried just about every solution in this thread and others without success. It wasn't until I changed the registry binary value for "FirstRowHasNames" from 01 to 00 that I had some success. I then ran the string without the HDR=NO;IMEX=1 in the extended properties. It may not be the right way but it worked

    Friday, November 07, 2008 5:06 PM
  • I am getting this error also "Count no find installable ISAM"

     

    This is my connection string as printed out using Debug.WriteLine.

     

    Provider=Microsoft.Jet.OLEDB.4.0; DataSource=C:\Book1.xlsx;Extended Properties="Excel 8.0;HDR=YES;"

     

    It looks find according to the thread above. The application can open access databases no problem. Why is there a problem with Excel?
    Friday, November 07, 2008 6:08 PM
  • For Excel 2007 files you need to use the ACE OLEDB provider instead.

     

    http://www.connectionstrings.com/?carrier=excel2007
    • Proposed as answer by Roger Moore Thursday, January 06, 2011 3:10 PM
    Friday, November 07, 2008 7:17 PM
  • Where does ACE come from?

     

    I now saved the xlsx file as an xls file. I then tried to use the connection string as before and I got the same result. .xls is an Excel 2003 file format. Why wont it work with the .xls file?

    Friday, November 07, 2008 11:01 PM
  • The Data Source argument should be two words, not one.

     

    The ACE provider is installed with Office 2007 or via the Office 2007 Data Connectivity Components.

    Saturday, November 08, 2008 12:44 AM
  • I'm having the same issue.  Though I'm the server support guy not the developer so code wise I'm pointing the developer here.  but on regards to the registry entries.  Should the 'WIN32 C:\WINDOWS\system32\msexcl40.dll' entry be in both the Engines\Excel and ISAM Formats\Excel 8.0 locations?  I have only Excel 2003 and Common components installed on the server.
    Friday, January 09, 2009 3:32 PM
  • Hi All,

    I am getting the same error:"Could not find installable ISAM". I am using visual studio 2005(in c#) and the file i am trying to access is MS access 2007 file under C:. I am new to visual studio, please help me look through my connection code to my MS access file. My project is a windows application project.

    Please assist and advice. Thank You.

    The name of the MS access 2007 file is Sample1


    string strAccessConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Sample1.mdb; User names=hee(FH\\hee);Password= ";

    DataSet myDataSet = new DataSet();
    OleDbConnection myAccessConn = null;


                 try
                {
                    myAccessConn = new OleDbConnection(strAccessConn);

                }
                catch (Exception ex)
                {
                    tbcheck.Text = "Error: "+ex.Message;
                    return;
                }

    string StrAccess = "SELECT * FROM Sample";----the name of my table in the MS access file is called Sample

                try
                {
                    OleDbCommand myAccessCommand = new OleDbCommand(StrAccess, myAccessConn);
                    OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(myAccessCommand);

                    
                    myAccessConn.Open();
                    //myDataAdapter.Fill(myDataSet, "Sample");
                }
                catch (Exception ex)
                {
                    tbcheck.Text = "Error:" + ex.Message;----The error msg is displayed here
                    return;
                }
                finally
                {
                    myAccessConn.Close();
                }







    Thursday, March 26, 2009 10:57 AM
  • Looks like a bad connection string to me. Should be User ID and not User names.

    http://www.connectionstrings.com/access

    Also, an Access 2007 database will require the use of the ACE OLEDB Provider and a different connection string.

    http://www.connectionstrings.com/access-2007
    http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=en


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, March 30, 2009 5:34 PM
  • I don't understand this whole thing.  I have read through and I am having the same issues as everyone else.  I am using classic ASP.  The page I wrote works fine on my localhost (Windows XP SP3) yet when I move the page to my webserver (Windows Server 2003 SP2) it fails.  I have tried the following with both Jet and Ace.  I have also tried hard coding the path with a driver letter.


    strConnExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=//mefspr01/groups/everyone/acct/AMS Working/Automation_Commission.xls;Extended Properties=""Excel 8.0; HDR=Yes;"""

    strConnExcel = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=//mefspr01/groups/everyone/acct/AMS Working/Automation_Commission.xls;Extended Properties=""Excel 12.0; HDR=Yes;"""

    Thanks, John
    Tuesday, April 07, 2009 2:23 PM
  • I would try fixing the UNC path to the file first and then give it another try. The forward-slashes should be back-slashes.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, April 07, 2009 3:08 PM
  • That did not work.

    Why the difference between the server and the localhost?  Also, just so you know I tried it with a drive mapping and that did not work either.


    strConnExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\mefspr01\groups\everyone\acct\AMS Working\Automation_Commission.xls;Extended Properties=""Excel 8.0; HDR=Yes;"""

    strConnExcel = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=I:\Everyone\Acct\AMS Working\Automation_Commission.xls;Extended Properties=""Excel 8.0; HDR=Yes;"""
    Tuesday, April 07, 2009 3:44 PM
  • I would suspect at this point that there is a configuration issue. If could be a security issue or it could be that the Jet OLEDB components are missing or not installed properly on your server. You may want to check out the following forum thread as well:

    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/c355ae2c-3d48-49b0-a745-477a8d06ac0a


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, April 07, 2009 5:26 PM
  • I tried to load MDAC 2.8 and it loaded.  I re-registered the msexcl40.dll and it still is failing.  I have no idea.

    I appreciate your attempts...  John
    Wednesday, April 08, 2009 1:25 PM
  • I don't think MDAC will help here. The components are part of the Jet install, and you should have the latest version already installed if you're running SP2.

    Can you open an Access database from your ASP application? That might at least rule out whether it's an Excel ISAM driver issue.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, April 08, 2009 1:56 PM
  • I can.  I do it all the time.  I was trying to get fancy and both pull in an excel spreadsheet and write another from an interactive intranet ASP application. 

    I am beginning to resolve myself into getting my other applications to offer up .csv files instead of .xls files.
    Wednesday, April 08, 2009 2:55 PM
  • I was having the same ISAM error problem and saw many corrections in VB, but here is a connection string that will work in C#.  I added a space after each semi-colon and the escape sequence for quotes on just the extended properties:


    OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Test.xls;Extended Properties=\"Excel 8.0; HDR=Yes; IMEX=1\"");

    Thursday, April 09, 2009 9:37 PM
  • This thing works,


    OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Test.xls;Extended Properties=\"Excel 8.0; HDR=Yes; IMEX=1\"");


    Thanks Buddy,

    I saved a lot of time because of your post.

    Friday, April 10, 2009 7:42 AM

  • It looks like Microsoft disabled the Access to Excel linking technology in Office 2003 SP2 because of a court decision based upon a long running patent infringement lawsuit:

    http://news.com.com/Patent+ruling+costs+Microsoft+8.9+million/2100-1007_3-5735432.html
    http://support.microsoft.com/?id=904953

    Unfortunately, the method they chose to do this (which is rather cheesy if you ask me) also broke the data access technology which relies on the same ISAM driver method. They have configured Microsoft Access to update the ISAM reference to point to the expression evaluator library (which of course is invalid when using the Jet library).

    I will check to see if there is a workaround for this. You could probably create a simple script that changes the registry entry to enable data access support for Excel but that may not be the best solution.

     

    Hi Paul,

    Did you ever get to the bottom of this?

    I've started a thread on on http://groups.google.com/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/5f8e00db05d51105#

    Everyone so far has mentioned the connectionstring, but I really don't think it's that.

    Cheers,

    James
    Monday, April 20, 2009 11:52 AM
  • What is your scenario? The error can occur for several reasons so it helps to know when you are encountering it (code would help).


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, April 21, 2009 3:48 PM
  • Thank you much.........it worked for me...
    Monday, April 27, 2009 6:49 PM
  •  

     

    @"provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strPath+";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";

     


    Hi ,
    try this in C# .net 3.5:

    @"provider=Microsoft.Jet.OLEDB.4.0;Data Source="+strPath+";Extended Properties=\"Excel 8.0;HDR=NO;IMEX=1\"";

    It worked for me...
    Thursday, September 10, 2009 5:07 AM
  • I can provide you the best solution if you really want to continue the work.

    This occurs when you work with MS 2007.

    So, you save the file in 97-2003 format.

    And then use the following source path.

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1"

    I came across the same problem and i could solve it easily.
    Thankyou..

    Hope, this would help you.


    Saturday, November 07, 2009 1:55 AM
  • I also had this problem and could not find any solutions.
    I tried so many different ways, finally found the solution by simply having the Provider, Data Source and Extended Properties only.
    Removed the HDR and the IMEX.
    This works for me.
    Hope it helps.
    Friday, December 18, 2009 6:36 AM
  • I struggled with the syntax errors myself for a bit. I used the following exact syntax to get it to stop giving the error. The line that really matters is the one that begins with "con = new.." The leading lines are just declaring my variables. I included them to let you know where you need to put yours in. Con is my OleDbConnection and Filename is just a string that is stored in a text box that is populated after selecting a file or allowing a user to type in the exact path. 


    Dim Filename As String
    Filename = txtUploadFile.Text
    Dim  con As New System.Data.OleDb.OleDbConnection

    con = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & Filename & ";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"";")
    Monday, March 08, 2010 10:55 PM
  • I had this issue when using an Access 2000 database in an old Visual Studio 6 VB project. Turned out I had to install service pack 6 for Visual Studio 6.
    Monday, May 03, 2010 8:33 PM
  • Hi Paul,

    I want to extract data from Excel 2007 to my vb.net 2005 form....I am using the following code for this...

    Imports

     

    System.Windows.Forms

    Imports

     

    System.Data

    Imports

     

    System.Data.SqlClient

    Imports

     

    Microsoft.Office.Interop

    Imports

     

    VB = Microsoft.VisualBasic

     

    Dim mycon As System.Data.OleDb.OleDbConnection

     

    Dim ds As DataSet

     

    Dim mycommand As System.Data.OleDb.OleDbDataAdapter

     

    Dim strcon As String

    strcon =

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" & excelPath & "';Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"""

    mycon =

    New System.Data.OleDb.OleDbConnection(strcon)

    mycommand =

    New System.Data.OleDb.OleDbDataAdapter("select * from[sheet1$]", mycon)

     

    ds = New DataSet

    mycommand.Fill(ds)

    DataGridView1.DataSource = ds.Tables(0)

    mycon.Close()

     But in the line  "mycommand.Fill(ds) " I am getting OleDbException exception of 'Invalid Argument'

    Can you please help me on this?

    Thanks,

    Purba

    Friday, July 16, 2010 2:58 PM
  • I had this issue and I input merged this reg to registry and solved, but don't forget some files should have under %windir%/system32

     

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats]

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\dBase 5.0]
    "Engine"="Xbase"
    "ExportFilter"="dBASE 5 (*.dbf)"
    "ImportFilter"="dBASE 5 (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="dBASE Index (*.ndx;*.mdx)"
    "CreateDBOnExport"=hex:00
    "ResultTextImport"="Import data from the external file into the current database. Changing data in the current database will not change data in the external file."
    "ResultTextLink"="Create a table in the current database that is linked to the external file.  Changing data in the current database will change data in the external file."
    "ResultTextExport"="Export data from the current database into a dBase 5 file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\dBase III]
    "Engine"="Xbase"
    "ExportFilter"="dBASE III (*.dbf)"
    "ImportFilter"="dBASE III (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="dBASE Index (*.ndx)"
    "CreateDBOnExport"=hex:00
    "ResultTextImport"="Import data from the external file into the current database. Changing data in the current database will not change data in the external file."
    "ResultTextLink"="Create a table in the current database that is linked to the external file.  Changing data in the current database will change data in the external file."
    "ResultTextExport"="Export data from the current database into a dBase III file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\dBase IV]
    "Engine"="Xbase"
    "ExportFilter"="dBASE IV (*.dbf)"
    "ImportFilter"="dBASE IV (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="dBASE Index (*.ndx;*.mdx)"
    "CreateDBOnExport"=hex:00
    "ResultTextImport"="Import data from the external file into the current database. Changing data in the current database will not change data in the external file."
    "ResultTextLink"="Create a table in the current database that is linked to the external file.  Changing data in the current database will change data in the external file."
    "ResultTextExport"="Export data from the current database into a dBase IV file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\FoxPro 2.0]
    "Engine"="Xbase"
    "ExportFilter"="Microsoft FoxPro 2.0 (*.dbf)"
    "ImportFilter"="Microsoft FoxPro (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="FoxPro Index (*.idx;*.cdx)"
    "CreateDBOnExport"=hex:00
    "ResultTextImport"="Import data from the external file into the current database. Changing data in the current database will not change data in the external file."
    "ResultTextLink"="Create a table in the current database that is linked to the external file.  Changing data in the current database will change data in the external file."
    "ResultTextExport"="Export data from the current database into a Microsoft FoxPro 2.0 file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\FoxPro 2.5]
    "Engine"="Xbase"
    "ExportFilter"="Microsoft FoxPro 2.5 (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="FoxPro Index (*.idx;*.cdx)"
    "CreateDBOnExport"=hex:00
    "ResultTextExport"="Export data from the current database into a Microsoft FoxPro 2.5 file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\FoxPro 2.6]
    "Engine"="Xbase"
    "ExportFilter"="Microsoft FoxPro 2.6 (*.dbf)"
    "CanLink"=hex:01
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:01
    "IndexFilter"="FoxPro Index (*.idx;*.cdx)"
    "CreateDBOnExport"=hex:00
    "ResultTextExport"="Export data from the current database into a Microsoft FoxPro 2.6 file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\FoxPro 3.0]
    "Engine"="Xbase"
    "ExportFilter"="Microsoft FoxPro 3.0 (*.dbf)"
    "CanLink"=hex:00
    "OneTablePerFile"=hex:01
    "IsamType"=dword:00000000
    "IndexDialog"=hex:00
    "CreateDBOnExport"=hex:00
    "ResultTextExport"="Export data from the current database into a Microsoft FoxPro 3.0 file.  This process will overwrite the data if exported to an existing file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\FoxPro DBC]
    "Engine"="Xbase"
    "ImportFilter"="Microsoft FoxPro 3.0 (*.dbc)"
    "CanLink"=hex:00
    "OneTablePerFile"=hex:00
    "IsamType"=dword:00000000
    "IndexDialog"=hex:00
    "CreateDBOnExport"=hex:00
    "ResultTextImport"="Import data from the external file into the current database. Changing data in the current database will not change data in the external file."
    "SupportsLongNames"=hex:00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\ISAM Formats\Jet 2.x]
    "Engine"="Jet 2.x"
    "OneTablePerFile"=hex:00
    "IndexDialog"=hex:00
    "CreateDBOnExport"=hex:00
    "IsamType"=dword:00000000

    "SandBoxMode"=dword:00000002
    "win32"="C:\\WINDOWS\\system32\\Msrd2x40.dll"

    Tuesday, August 17, 2010 6:28 PM
  • I have the same problem.  Due to a virus on the work computer, I installed XP professional from XP home...Now to bypass the virus, I installed a new hard drive to act as C: and the old drive is now D:  All the programs are on the D: drive.  I didn't want to lose all the info on the old drive so that's why I didn't want to wipe it. 

    Of course Access 2003 wouldn't work.  I then installed SP2 and the Office SP2 fix and somehow managed to get Access to work.  Then when we tried to import an Excel worksheet as a table (which we normally did)...I got the dreaded "could not find installable ISAM".

     

    When I followed the Microsoft fix I found that I have the registry pointing to C:\Program Files\Microsoft Office\OFFICE11\msaexp30.dl l.  I changed the registry and it just reinstates the registry. 

    I've read that you can change the connection string but I have NO clue how to do that.  When I google it I don't find a step by step or anything for that matter. 

    Any help would be greatly appreciated.

    SteveO

    Wednesday, October 20, 2010 2:09 PM
  • Wow...no one can help me?

     

    :(


    SteveO

    Tuesday, October 26, 2010 1:25 PM
  • Wow...no one can help me?

     

    :(


    SteveO


    If you can't even import through Microsoft Access then this is an issue with Microsoft Office and doesn't really have anything to do with Visual Basic .NET.

    Personally I would recommend completely uninstalling Office, deleting any remnants and then performing a re-install.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, October 26, 2010 2:08 PM
  • Hi All,

    Similar problem to the others. I have Excel 2010 (14.0). I've installed ACE 12.0, and it shows up in my registry.

    I've tried all the variants of connection strings mentioned here, and they all give the ISAM error.

    One thing I've noticed is that my registry doesn't show an Excel 14.0 key under ISAM formats (in ...\Office\14.0\Access Connectivity Engine\ISAM Formats\), though it does show Excel 12.0, 8.0 and 5.0. Is this relevant?

    What I'm trying to do is connect to data within the same workbook in order to run queries against it. My connection string is as follows:

    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myfile.xlsm;Extended Properties="Excel 14.0";"

    I've also tried the variants including HDR and IMEX:

    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myfile.xlsm;Extended Properties="Excel 14.0;IMEX=1;HDR=Yes";"

    Thanks very much for any help you can give!

    Cheers,

    Paul

    Thursday, November 25, 2010 4:56 PM
  • Hi All,

    Similar problem to the others. I have Excel 2010 (14.0). I've installed ACE 12.0, and it shows up in my registry.

    What I'm trying to do is connect to data within the same workbook in order to run queries against it. My connection string is as follows:

    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myfile.xlsm;Extended Properties="Excel 14.0";"

    First, there is no version 14.0. The correct version is 12.0 for both Office 2007/2010 files.

    Second, the syntax can be a bit tricky when using the Extended Properties argument. Below is an example:

    ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
      "Data Source=C:\Test Files\Book1.xlsm;Extended Properties=""Excel 12.0 Xml;HDR=No"""
    
    

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Friday, November 26, 2010 2:03 PM
  • Thanks Paul. Connectionstrings.com apparently has the wrong data (ie, v14.0).

    Cheers,

    Paul

    Monday, November 29, 2010 10:15 AM
  • Hi, you can use the following methology :-

    OleDbConnection connection = new OleDbConnection();

                String filePath = @"C:\Users\Harpreet\Desktop\test.xlsx";

                String strConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filePath + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\"";

                connection.ConnectionString = strConnectionString;

     

     

    Here at "filePath "set yor customized file path from where you wana extract data. 

     

    Thanks!

    Tuesday, December 28, 2010 9:20 AM
  • Hi Guru's,

    Here i want to explain one thing. you can use below two connections strings to read excle file

    1)

    <strong>string
    
     connString = "Provider=Microsoft.Jet.OleDb.4.0; data source="
    
     + inputFilename + ";Extended Properties=Excel 8.0;"
    
    ;</strong>
    
    
    
    

     

    above connString works fine when you want to read all the data from excel sheet, but the problem with the above conn string is if you have empty rows at the end of excel it will read empty rows as well

    but if you don't want to read empty rows at the end of the excel sheet use below one

    2)

    <strong>string
    
     connString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source="
    
     + filePath + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\""
    
    ;</strong>
    
    
    
    

     

    this works fine, you can use directly

    full code...

     

    public
    
     void
    
     ReadXLs(string
    
     filePath, string
    
     SheetName)
     {
     string
    
     connString = "Provider=Microsoft.Jet.OleDb.4.0;Data Source="
    
     + filePath + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=1\""
    
    ;
     OleDbConnection oledbConn = new
    
     OleDbConnection(connString);
     try
    
    
     {
      oledbConn.Open();
      OleDbCommand cmd = new
    
     OleDbCommand("SELECT * FROM ["
    
     + SheetName + "$]"
    
    , oledbConn);
      OleDbDataAdapter oleda = new
    
     OleDbDataAdapter();
      oleda.SelectCommand = cmd;
      DataSet ds = new
    
     DataSet();
      oleda.Fill(ds, "test"
    
    );
     }
     catch
    
     (Exception ee)
     {
      Response.Write(ee.Message);
     }
     finally
    
    
     {
      oledbConn.Close();
     }
     }
    

     

     

    Thanx :-)

    Venkat

     

     

    Thursday, December 30, 2010 1:24 PM
  • Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES"; this will definitely work. im guessing your using excel 2003 or 2007 so this would solve the issue of mix data type on your excel file.
    Thursday, January 13, 2011 10:25 AM
  • Thank you BimalGeorge. This worked very well. Thanks a lot..!!
    Wednesday, March 02, 2011 5:37 AM
  • Hi Maheshmohan

                 Just remove the keyword as HDR=Yes from provider.

    such as

    NewOleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & FilePath & ";Extended Properties=""Excel 8.0;IMEX=1"";")

     

    it will be work fine

    Friday, March 18, 2011 10:39 AM
  • Just as a side note, if you dont have driver installed, then you will surely need to install those on your box. If you dont have the room to install a new driver, you may want to downgrade your package to use Office 97-2003 products.
    Thursday, April 28, 2011 9:19 PM
  • I really hope that you will have the time to answer this.

    I am trying to use ACE 14.0 with the hope that I will be able to pass the 255 columns limit. So I downloaded and formatted the connection string like this:

    @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\ExcelData\CSENG01.xlsx;Extended Properties='Excel 14.0;HDR=No;IMEX=1'";

    Getting the "Could not find installable ISAM" error.

    The connection string is the one recommended by the MS download site

    2.If you are an application developer using OLEDB, set the Provider argument of the ConnectionString property to “Microsoft.ACE.OLEDB.12.0”
    3◦If you are connecting to Microsoft Office Excel data, add “Excel 14.0” to the Extended Properties of the OLEDB connection string.

    How the connection string suppose to look for ACE.OLEDB.12.0?

    Thanks,

    Mihail

    Monday, August 15, 2011 6:48 PM
  • This thread is several years old. If you don't find your answer then I would recommend posting a new question.
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, August 15, 2011 6:56 PM
  • I'm using this and it works:

     

    Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\zz.xlsx;Extended Properties="Excel 12.0

    ;HDR=NO;IMEX=1;"

    Thursday, September 01, 2011 10:55 AM
  • when we use more than one Extended Properties like,

    1. Excel 8.0

    2. HDR=No

    3. IMEX=1

    Then those have to be enclosed in a double code like

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Sample.xls;Extended Properties="Excel 8.0;IMEX=1;TypeGuessRows=0;ImportMixedTypes=Text"

     


    • Edited by jokertin92 Monday, September 26, 2011 6:33 AM
    • Proposed as answer by Terry Dickens Wednesday, August 14, 2013 7:45 PM
    Monday, September 26, 2011 5:42 AM
  • Thanks Paul, Even Microsoft.com priovides the wrong information (i.e. Excel 14.0)

    Wrong Instruction provided at http://www.microsoft.com/download/en/details.aspx?id=13255

    If you are an application developer using OLEDB, set the Provider argument of the ConnectionString property to “Microsoft.ACE.OLEDB.12.0”
    ◦If you are connecting to Microsoft Office Excel data, add “Excel 14.0” to the Extended Properties of the OLEDB connection string.

    Tuesday, February 28, 2012 1:01 PM
  • DUE TO INCORRECT SYNTAX OF CONNECTION STRING I WAS GETTING SAME PROBLEM.

    THANKS FOR POSTING THIS SOLUTION.

    Thursday, March 15, 2012 2:45 PM
  • please help me iam writing the following in the app.config file

    <connectionStrings>
        <add name="Curtains.My.MySettings.CurtainsConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot;|DataDirectory|\Curtains.accdb&quot;"
          providerName="System.Data.OleDb" />
        <add name="Curtains.My.MySettings.Curtains_ConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\Curtains .accdb;Jet OLED:Database    Password=fbs;"  providerName="System.Data.OleDb" />
      </connectionStrings>

    but the same error occurs and the access file is protected by the enycreption password

    PLZ ADVISE

    Regards

    Monday, March 19, 2012 8:50 PM
  • I copied & pasted jokertin92's suggestion and it worked for me.

    stringstrconn = "Provider = Microsoft.Jet.OLEDB.4.0;"+

    "Data Source="+ path + ";"+ "Excel 8.0;IMEX=1;TypeGuessRows=0;ImportMixedTypes=Text;";

    When I have the word "Extended Properties" then the app blows up when reading Excel.  When I don't have the word "Extended Properties", then the app doesn't blow up and reads the values correctly.  The original connection string for this app didn't have IMEX=1.  So some of the time it wasn't returning the numeric value for a column, if that column had spaces in another row.  Adding IMEX=1 fixed that. Doesn't seem to matter if TypeGuessRows and ImportMixedTypes are used or not.

    Wednesday, August 14, 2013 7:59 PM
  • I Fixed so:

    I change: 

    string conexion = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\Fa.mdb;Database Password=xxx;";

    to:

    string conexion = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\temp\Fa.mdb;Persist Security Info=False; Jet OLEDB:Database Password='xxx';";


    Monday, October 28, 2013 1:48 PM