Excel “External table is not in the expected format.”

后端 未结 24 2083
执念已碎
执念已碎 2020-11-22 05:13

I\'m trying to read an Excel (xlsx) file using the code shown below. I get an \"External table is not in the expected format.\" error unless I have the file already open in

24条回答
  •  眼角桃花
    2020-11-22 05:35

    I had this same issue(Using the ACE.OLEDB) and what resolved it for me was this link:

    http://support.microsoft.com/kb/2459087

    The gist of it is that installing multiple office versions and various office sdk's, assemblies, etc. had led to the ACEOleDB.dll reference in the registry pointing to the OFFICE12 folder instead of OFFICE14 in

    C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL

    From the link:

    Alternatively, you can modify the registry key changing the dll path to match that of your Access version.

    Access 2007 should use OFFICE12, Access 2010 - OFFICE14 and Access 2013 - OFFICE15

    (OS: 64bit Office: 64bit) or (OS: 32bit Office: 32bit)

    Key: HKCR\CLSID{3BE786A0-0366-4F5C-9434-25CF162E475E}\InprocServer32\

    Value Name: (Default)

    Value Data: C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL

    (OS: 64bit Office: 32bit)

    Key: HKCR\Wow6432Node\CLSID{3BE786A0-0366-4F5C-9434-25CF162E475E}\InprocServer32\

    Value Name: (Default)

    Value Data: C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL

提交回复
热议问题