November 29, 2009 at 3:47 pm
HI
I have excel destination file.what i am looking here is that
I want to create a different files(EXcel) each time by adding a unique identifier to the file name,
Any help ?
November 30, 2009 at 3:36 am
Add a File system task and use it to rename the file via a variable.
-------------------------------------------------------------------------
Normal chaos will be resumed as soon as possible. :crazy:
November 30, 2009 at 3:47 am
If you want to create dynamic file names in excel the best way is to click on properties of the Excel Connection manager then select expressions and then select ExcelFilePath property and use a Variable to dymanically create the file name
December 1, 2009 at 12:41 am
Hi,
You can add a File System Task at the end of the flow.
Create 2 different variables for Source & Destination file.
Like for Destination excel file you can set the property EvaluateAsExpression = TRUE and expression = @[DirName] + "\\" + @[ExcelFileName] + "_" + (DT_WSTR,4)DatePart("yyyy", GetDate()) + "-" + RIGHT("0" + (DT_WSTR,2)DatePart("mm", GetDate()), 2) + "-" + RIGHT("0" + (DT_WSTR,2)DatePart("dd", GetDate()), 2) + "_" + RIGHT("0" + (DT_WSTR,2)DatePart("hh", GetDate()), 2) + "-" + RIGHT("0" + (DT_WSTR,2)DatePart("mi", GetDate()), 2) + ".xls"
This expression will create a new file each time with this kind of suffix: <FILENAME>_YYYY-MM-DD_HH-MM, example XXXX_2009-12-01_13-03.xls
Set the Destination & Source Variable and Operation as "Copy file".
and you are done 🙂
~Manoj
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply