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

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

    Just add my case. My xls file was created by a data export function from a website, the file extention is xls, it can be normally opened by MS Excel 2003. But both Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 got an "External table is not in the expected format" exception.

    Finally, the problem is, just as the exception said, "it's not in the expected format". Though it's extention name is xls, but when I open it with a text editor, it is actually a well-formed html file, all data are in a

    , each is a row and each
    is a cell. Then I think I can parse it in a html way.

    提交回复
    热议问题