【发布时间】:2014-03-11 05:17:21
【问题描述】:
我正在尝试使用 foreach 循环容器将几个 excel 文件导入表中,我指定了要使用的文件夹和文件 (*.xls),然后我创建了一个路径变量然后我转到excel源连接并在“表达式”属性中选择了变量。我创建了foreach 容器,但是excel 源的connectionString 只显示Provider=Microsoft.Jet.OLEDB.4.0;,所以这意味着它没有采用变量值。我能做些什么来解决这个问题?
注意:我使用的是 SQL Server 2012
其他信息:
Error at Data Flow Task [Excel Source [20]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error at Data Flow Task [SSIS.Pipeline]: Excel Source failed validation and returned error code 0xC020801C.
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
Error at Package [Connection manager "Excel Connection Manager"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
(Microsoft.DataTransformationServices.VsIntegration)
【问题讨论】:
-
将
DelayValidation设置为True再试一次 -
还将
ConnectionString表达式更改为使用ExcelFilePath,而不是使用您的Path 变量。 -
在此之前可能会发布错误消息,其中包含有关 AcquireConnection 方法调用失败原因的更多信息。导航回日志。它会准确地说明发生了什么。
-
谢谢大家,我在你们的 cmets 和 Maverick's Answer 之间做了一个组合,效果很好
标签: sql-server excel ssis business-intelligence sql-server-2012-datatools