Skip to content

Generated xlsx files cannot be imported through OLEDB drivers #330

Closed as duplicate

Description

@peterd1228

Excel Type

  • XLSX

阿翰:
你好!
今天打算将生成的文件导入MSSQL库,使用

INSERT INTO table select * from OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=Yes;IMEX=1;Database=','sql语句')

报错 External table is not in the expected format.

如果 将 excel文件 另存为 还是这个格式,这个导入就能成功。

可能这个也不算bug,但我也没找到这个具体是什么格式,还请解下惑,谢谢!

MiniExcel Version

Description

Activity

  1. added
    enhancement
    on Mar 6, 2022
  2. densen2014 commented on Jan 20, 2023

    @densen2014

    我的解决方案是统一优先 miniexcel读取 OLEDB 后备.

  3. shamork commented on Aug 31, 2023

    @shamork

    我使用Navicat导入也是报错,使用office另存为xlsx后也不行,但另存为xls后就可以了

  4. changed the title [-]生成的xlsx文件不能使用OLEDB方式导入数据库[/-] [+]Generated xlsx files cannot be imported through OLEDB drivers[/+] on Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions