Using Variable Values in Excel Destn Filenames to dynamically create Excel Files

  • Hi All,

    I have a problem, I want to create several 100 reports from one table that should go into seperate excel files..

    now I need to find a way to create Excel files Dynamically with changing date in there...

    Like

    D:\Tempfolder\Report_on_@startdatevalue...

    Pls tell me if you know...how to create dynamically excel files from same table with names having a variablevalue in it..

    Regards

    Thanks in advance

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • On your connectionmanager, look at the expressions section.

    Add an expression and change the connectionstring property to your variable.

    TADA

    ~PD

  • I think you can use the Script Task component.

    At first you must define a variable @x

    After that you can set it in the Script Task component.

    Dts.Variables("x").Value= "D:\Tempfolder\Report_on_" + @startdatevalue

    as a next job;

    when you define Excel File connection Manager , Point varible x.

    I'm sure it works because I use this method.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply