|
I am trying to pass a variable (filename with path) to a package to send that variable to SSIS as an Excel Source. I have a variable defined as a string and a default value where an Excel file is located (verified). When I change the Data Access Mode to table name or variable and then select the variable it throws the error that opening the rowset failed. Any ideas? TIA! David L. Crooks
(comments are locked)
|
|
You need to create an Excel connection manager. Temporarily hard-code the path to any workbook. Then bring up the properties for the new connection. Select expressions, and add an expression for ExcelFilePath. Set the expression equal to your variable. Then, when you create your data flow source using that connection, the table or view name will be a worksheet name. Thanks! I got that. Now, I want to be able to pass the SSIS package a parameter which will be the name of the file that goes into the variable. Do I need to change the dtsConfig file with the new file name? TIA!
Oct 20 '09 at 08:34 PM
dcrooks
Assuming you are using dtexec to run the package, add this to the command line: /set package.variables[myvariable].Value;myvalue
Oct 21 '09 at 04:35 AM
Tom Staab
I am now trying to call the package from C# and it is failing. I will try it from dtexec and see it that works. Thanks!
Oct 22 '09 at 01:02 AM
dcrooks
(comments are locked)
|

