none
error in connection string with excel 2007 from ms access 2007 RRS feed

  • Question

  • I am creating a application in ms access 2007 and want to upload a file from then excel 2007 but could not able to connect from ms access 2007 to excel 2007 below is the connection string i am using

    cnE.Provider = "Microsoft.ACE.OLEDB.12.0"
    cnE.ConnectionString = "Data Source=c:\metadata.xlsx;Extended Properties=Excel 12.0;HDR=YES"

    but getting error "Could not find installable ISAM".
    I installed AccessDatabaseEngine but still getting same errorr.

    Please suggest how can i resolve this issue. 
    Friday, July 3, 2009 4:21 AM

Answers

  • If you want to use multiple extended properties in your connection string, like in your original post where you have HDR=Yes, then you need to enclose all extended proeprties into additional double quotes and then it should work. Something like


    cnE.ConnectionString = "Data Source=c:\metadata.xlsx;Extended Properties=""Excel 12.0;HDR=YES"""

    Val Mazur (MVP) http://www.xporttools.net
    Friday, July 3, 2009 11:59 AM
    Moderator

All replies

  • issue is resloved, i used below conection string

    cnE.Provider = "Microsoft.ACE.OLEDB.12.0"
    cnE.ConnectionString = "Data Source=c:\metadata.xlsx;Extended Properties=Excel 12.0"

    Now it is running fine

    Thanks.

    Friday, July 3, 2009 5:51 AM
  • If you want to use multiple extended properties in your connection string, like in your original post where you have HDR=Yes, then you need to enclose all extended proeprties into additional double quotes and then it should work. Something like


    cnE.ConnectionString = "Data Source=c:\metadata.xlsx;Extended Properties=""Excel 12.0;HDR=YES"""

    Val Mazur (MVP) http://www.xporttools.net
    Friday, July 3, 2009 11:59 AM
    Moderator