none
could not find installed ISAM. Excel 2007 with VB.Net 2005 RRS feed

  • Question

  • Hi All,

     

    I am getting #could not find installed ISAM# Error when i try to open excel file using vb.net. i am using below connection string.

    Dim con As OleDbConnection
    con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;" & " Data Source=" & sPath & "; Extended Properties=Excel 12.0;HDR=YES;IMEX=1")
    

     

    Actually it is working fine. but i install office 2003 and again i uninstall office 2003 and re install the office 2007. then it stops working and started the throwing error. so please suggest. i also read the other threads but.... that not solved my problem.

    Thanks

     

    Mitesh


    ~Khatri Mitesh
    khatrimitesh@hotmail.com
    Software Developer
    Rajasthan-India
    http://www.youtube.com/watch?v=-oJaaPCrk3Q
    Wednesday, August 4, 2010 11:02 AM

Answers

  • I believe you need to enclose Extended Properties values into separate double quotes, something like

    con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;" & " Data Source=" & sPath & "; Extended Properties="""Excel 12.0;HDR=YES;IMEX=1""")


    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, August 4, 2010 9:21 PM
    Moderator
  • Hi Paul,

     

    I  already checked this link and checked the other connection strings. if connection string is wrong then how it is working some days ago from last 1 year. This problem is occur after uninstall the office 2007 and again install the office 2007. so i think it is related to some registry setting or dll ? so please tell me if you have any other solutions.


     

    I cannot explain what you are describing, but I tested your connection string and it fails with the "Installable ISAM" error. The following is the correct syntax:

    con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=" & sPath & ";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""")
    

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, August 5, 2010 9:20 AM
  • OK, this isn't displaying properly here so I'm going to try multiple lines:

        con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=" & _
                     sPath & _
                     ";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""")
    
    

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, August 5, 2010 9:30 AM

All replies

  • The syntax in your connection string looks to be incorrect. See my response in the below forum thread:

    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/62ee4978-ca29-48d3-9367-6dd4ab639d2d/

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, August 4, 2010 5:38 PM
  • I believe you need to enclose Extended Properties values into separate double quotes, something like

    con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;" & " Data Source=" & sPath & "; Extended Properties="""Excel 12.0;HDR=YES;IMEX=1""")


    Val Mazur (MVP) http://www.xporttools.net
    Wednesday, August 4, 2010 9:21 PM
    Moderator
  • Hi Paul,

     

    I  already checked this link and checked the other connection strings. if connection string is wrong then how it is working some days ago from last 1 year. This problem is occur after uninstall the office 2007 and again install the office 2007. so i think it is related to some registry setting or dll ? so please tell me if you have any other solutions.

     

    Thanks very much for your quick reply.

     


    ~Khatri Mitesh
    khatrimitesh@hotmail.com
    Software Developer
    Rajasthan-India
    http://www.youtube.com/watch?v=-oJaaPCrk3Q
    Thursday, August 5, 2010 5:02 AM
  • Hi VMazur,

     

    Your provided connection also contains error. i think missing double quotes is the problem in this. but i checked after adding double quote but no success yet... let me know if you have any other fixes...

    Thanks


    ~Khatri Mitesh
    khatrimitesh@hotmail.com
    Software Developer
    Rajasthan-India
    http://www.youtube.com/watch?v=-oJaaPCrk3Q
    Thursday, August 5, 2010 5:04 AM
  • Hi Paul,

     

    I  already checked this link and checked the other connection strings. if connection string is wrong then how it is working some days ago from last 1 year. This problem is occur after uninstall the office 2007 and again install the office 2007. so i think it is related to some registry setting or dll ? so please tell me if you have any other solutions.


     

    I cannot explain what you are describing, but I tested your connection string and it fails with the "Installable ISAM" error. The following is the correct syntax:

    con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=" & sPath & ";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""")
    

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, August 5, 2010 9:20 AM
  • OK, this isn't displaying properly here so I'm going to try multiple lines:

        con = New OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source=" & _
                     sPath & _
                     ";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""")
    
    

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, August 5, 2010 9:30 AM
  • This connection string is working for me

    Conn =

    New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.Oledb.12.0;Data Source='C:\Akhtar\Copy of StormQuestionnaire\StormQuestionnaire\StormQuestionnaire\HL.xlsx'; Extended Properties=""Excel 12.0; HDR=YES""")

    Tuesday, August 31, 2010 12:28 AM
  • This fixed my issue.  Thanks Paul.
    Thursday, April 5, 2012 10:19 PM