Results 1 to 3 of 3

Thread: Connecting to Excel 2010 64bit

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    20

    Connecting to Excel 2010 64bit

    Hopefully some one can help here I have 64bit winform app that is trying to connection Excel 2010 64bit. I researched a lot websites and came up with the following connection string:

    Provider=Microsoft.ACE.OLEDB.12.0;data source=<Filename>;Extended Properties="Excel 14.0;HDR=Yes;IMEX=1"

    But my code runs I get the following OleDBException

    "Could not find installable ISAM."

    I've downloaded and installed the correct version of "Microsoft Access database engine 2010".

    Any help would be great

  2. #2
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,670

    Re: Connecting to Excel 2010 64bit

    If you are sure the provider is properly installed I would build my connection string as follows
    Code:
    Dim Builder As New OleDbConnectionStringBuilder With _
        { _
            .DataSource = IO.Path.Combine(Application.StartupPath, "MyBook.xlsx"), _
            .Provider = "Microsoft.ACE.OLEDB.12.0" _
        }
    
    Builder.Add("Extended Properties", "Excel 12.0;HDR=Yes;IMEX=1")
    Console.WriteLine(Builder.ConnectionString)
    Or set extended properties to
    Code:
    Builder.Add("Extended Properties","HDR=Yes;IMEX=1;Jet OLEDB:Engine Type=37")
    Also try removing IMEX=1 and see what happens, it may connect but cause issues with your data and if so you might need to consider setting IMEX to another value 0 or 2 then again you might need to rethink your entire solution. Excel can be difficult at times and sometime down right refuse to work as expected with OleDb thus requiring early or late binding.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2005
    Posts
    20

    Re: Connecting to Excel 2010 64bit

    Thanks for the info I'll try it out

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width