getting an Unexpected error from external database driver (1) when importing data from excel to access

前端 未结 16 2536
鱼传尺愫
鱼传尺愫 2021-02-08 05:23

I have a 2010 Excel file with a sheet that spans 34864 rows and 1387 columns. I\'m trying to import it into Access 2010 with

相关标签:
16条回答
  • 2021-02-08 06:00

    Check out this for Access 2010 specification: http://office.microsoft.com/en-us/access-help/access-2010-specifications-HA010341462.aspx.

    In your case, it might be number of columns, so try to import less than 255 first. Also, it might be the size of the data in the columns or data types (importing text into numeric etc.)

    0 讨论(0)
  • 2021-02-08 06:03

    Another issue that is discovered is if the excel file is saved as a binary excel worksheet just resave it as an excel workbook and it loaded fine.

    0 讨论(0)
  • 2021-02-08 06:05

    A solution that has worked for me when tackling this issue is to have the Excel File where the Import / Export is being executed open when the Import & Export is happening.

    The issue appears to be caused by the Patch preventing data transaction from occurring between CLOSED .xls files and other external database applications. Having the excel file open addresses this issue.

    Some sample code examples below to highlight what works and what doesn't with VBA:

    FAILS

    wbTarget.SaveAs strFilename, xlExcel8
    wbTarget.Close    
    ExportSheetToDB strFilename, strSheetName, "tblTemp"
    

    WORKS

    wbTarget.SaveAs strFilename, xlExcel8
    ExportSheetToDB strFilename, strSheetName, "tblTemp"
    wbTarget.Close
    
    0 讨论(0)
  • 2021-02-08 06:07

    Download and install the Microsoft Access Database Engine 2010 Redistributable, and then modify the DB connection strings in Microsoft Excel to use ACE as a provider.

    Change (example):

    Provider=Microsoft.Jet.OLEDB.4.0
    

    to:

    Provider=Microsoft.ACE.OLEDB.12.0.
    

    Microsoft is working on a resolution and will provide an update in an upcoming release.

    0 讨论(0)
  • 2021-02-08 06:08

    I just experienced this problem too and found a very simple, easy solution. I noticed that my spreadsheet had a custom name so I decided to see if that was causing the problem. I changed it to the default name of "Sheet1" and, sure enough, it worked!!

    0 讨论(0)
  • 2021-02-08 06:10

    You may experience this error after installing security patch KB4041681. See this MSDN entry. In my case, replacing Microsoft.Jet.OLEDB.4.0 provider with Microsoft.ACE.OLEDB.12.0 helped.

    0 讨论(0)
提交回复
热议问题