October 19, 2005 at 8:25 pm
Hi all,
I have a DTS package which exports data into an Excel file, with the source as the results from a SQL Server stored procedure, and the destination as an Excel file which already exists.
Is it possible to run the package with a different Excel file name each time? For example, I want to use dtsrun command prompt utility but let the user specify an excel file name to be saved.
Thanks a lot,
delpiero
October 20, 2005 at 9:40 am
Create a global variable and assign it to the excel output filename.
To do so, select Package/Properties/Global variables. type in a global variable.
Add a dynamic Properties taask to the package. Looks like a puzzle.
To assign, double click dynamic properties task/add/expand connections/Highlight the excel con/double click on datasource/dropdown arrow to global variable/dropdown to the variable you have created.
Whenver you run the package supplying a value for the global variable, it will write to an excel file of that name.
October 20, 2005 at 7:35 pm
Thanks Jonathan, Your method works fine.
But is it possible to specify a network drive or UNC path for the excel file? I found that I always got an "failure to create file" error even I have set all the permissions and used UNC names.
Thanks
delpiero
October 21, 2005 at 5:43 am
If you are getting problems with the unc path, map a drive and use that instead.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply