Context
I'm trying to create an SSIS package to import from EXCEL (Microsoft Excel Worksheet (.xlsx)) files into SQL Server 2012. All files have a single tab with the same tab name.
The process works when I specify a single file.
The process fails when I try to use a For Each container.
In the For Each File Enumerator I've created a variable [user@ExcelFileName]
Error
In the expressions of the excel connection manager, I've attempted the following values for the ConnectionString:
> -@[User::ExcelFileName]
-"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + @[User::ExcelFileName] + ";Extended Properties=Excel 8.0"
-"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::Filename] + ";Extended Properties=\"Excel 12.0\";"
- "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::Filename] + ";Extended Properties=\"Excel 12.0;HDR=YES\";"
They all fail.
This is the error message:
Error at Data Flow Task [Excel Source [1]]: 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]: component "Excel Source" (1) 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: 0x80040E73. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040E73 Description: "Format of the initialization string does not conform to the OLE DB specification.".
Any suggestions ?