I have a simple SSIS 2012 package with:
SourceFileExcel FUNB to connect to the fileFUNB Connection ManagerWhen trying to assign the ConnectionString dynamically, I get error:
[Excel Source [2]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "FUNB" failed with error code 0xC0209303. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
I have tried the following:
Once file loaded manually, update connection manager properties. Set ConnectionString Expression:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+@[User::SourceFileExcel]+";Extended Properties=\"EXCEL 8.0;HDR=Yes; IMEX=1\";"
Above produces the error. Change the expression to ExcelFilePath set to:
@[User::SourceFileExcel]
Both the ExcelFilePath and the ConnectionString expressions produce the same error. I have tried both with DelayValidation=True on the Excel Connection Manager and the Data Flow object.
I have another package on the same server that works in much the same way but is using a CSV connection. This package runs normally. The Windows Security Permissions on both source file folders is the same.
Any ideas on what I am doing wrong?
I think that you should use Microsoft.ACE.OLEDB.12.0 as Provider when connecting to excel 2007 or higher, Also make sure you are not running the package in 64-bit mode
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::SourceFileExcel] + ";Extended Properties=\"Excel 12.0;HDR=YES\";"
Or try the following format (without writing Extended Properties)
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::SourceFileExcel] + ";Excel 12.0;HDR=YES;IMEX=1"
If none of these suggestions works, then i think that this is not an expression issue, and you are facing the same issue in this link.
The problem maybe that a 64-bit office installation was found on the machine and it needed to install 32-bit AccessDatabaseEngine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With