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

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

    Use this

    OleDbConnection conObj = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\a.XLS;Extended Properties=Excel 8.0;")
    

    instead of this

    OleDbConnection conObj = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\a.XLS;Extended Properties=Excel 8.0;")
    

提交回复
热议问题