尝试在 SSIS 中导入 Excel 文件时出现 "External table is not in the expected format." 错误
Getting "External table is not in the expected format." error while trying to import an Excel File in SSIS
我正在尝试通过 SSIS 将 Excel 文件 (.xls
) 导入到 SQL 服务器中的 table。但是 SSIS 似乎没有将该文件识别为有效的 Excel 文件。我收到以下错误:
错误 1:
[Excel Source [86]] Error: SSIS
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "Carga Base Original" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
错误 2:
[SSIS.Pipeline]
Error: Excel Source failed validation and returned error code 0xC020801C.
错误 3:
[Connection manager "Carga Base Original"] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.
Source: "Microsoft Access Database Engine"
Hresult: 0x80004005
Description: "External table is not in the expected format".
我的连接管理器属性是一个 Excel 源,它的属性如下所示:
我正在通过变量传递 Excel 文件路径。 Excel 文件看起来没问题,没有损坏。我试图放置一个修复 Excel 路径,尝试将其放入连接字符串 属性(修复路径和变量),但没有任何帮助。
谁能帮帮我?
主要错误是:
External table is not in the expected format
当 Excel 文件损坏并且无法通过 Access 数据库引擎(OLE DB 提供程序)打开时,即使您可以从 Excel 打开文件,也会发生这种情况。在类似的情况下,手动打开文件并将其另存为新文件可能会成功。
在我的例子中,将邮件合并参考 Excel 文件保存为 .xls (Excel 97 - 2003) 有效。 .xlsx 引发了“外部 table 不是预期格式”错误消息,但 .xls 没有。
我正在尝试通过 SSIS 将 Excel 文件 (.xls
) 导入到 SQL 服务器中的 table。但是 SSIS 似乎没有将该文件识别为有效的 Excel 文件。我收到以下错误:
错误 1:
[Excel Source [86]] Error: SSIS
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "Carga Base Original" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
错误 2:
[SSIS.Pipeline]
Error: Excel Source failed validation and returned error code 0xC020801C.
错误 3:
[Connection manager "Carga Base Original"] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft Access Database Engine"
Hresult: 0x80004005
Description: "External table is not in the expected format".
我的连接管理器属性是一个 Excel 源,它的属性如下所示:
我正在通过变量传递 Excel 文件路径。 Excel 文件看起来没问题,没有损坏。我试图放置一个修复 Excel 路径,尝试将其放入连接字符串 属性(修复路径和变量),但没有任何帮助。
谁能帮帮我?
主要错误是:
External table is not in the expected format
当 Excel 文件损坏并且无法通过 Access 数据库引擎(OLE DB 提供程序)打开时,即使您可以从 Excel 打开文件,也会发生这种情况。在类似的情况下,手动打开文件并将其另存为新文件可能会成功。
在我的例子中,将邮件合并参考 Excel 文件保存为 .xls (Excel 97 - 2003) 有效。 .xlsx 引发了“外部 table 不是预期格式”错误消息,但 .xls 没有。