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

前端 未结 16 2457
鱼传尺愫
鱼传尺愫 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: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
    

提交回复
热议问题