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

后端 未结 24 1602
执念已碎
执念已碎 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:21

    I recently had this "System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format." error occur. I was relying on Microsoft Access 2010 Runtime. Prior to the update that was automatically installed on my server on December 12th 2018 my C# code ran fine using Microsoft.ACE.OLEDB.12.0 provider. After the update from December 12th 2018 was installed I started to get the “External table is not in the expected format" in my log file.

    I ditched the Microsoft Access 2010 Runtime and installed the Microsoft Access 2013 Runtime and my C# code started to work again with no "System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format." errors.

    2013 version that fixed this error for me https://www.microsoft.com/en-us/download/confirmation.aspx?id=39358

    2010 version that worked for me prior to the update that was automatically installed on my server on December 12th. https://www.microsoft.com/en-us/download/confirmation.aspx?id=10910 https://www.microsoft.com/en-us/download/confirmation.aspx?id=10910

    I also had this error occur last month in an automated process. The C# code ran fine when I ran it debugging. I found that the service account running the code also needed permissions to the C:\Windows\Temp folder.

提交回复
热议问题