Error with dynamic excel connection manager using ssis variable in expression

  • Hey guys, I have an excel connection manager that I have an expression using an ssis variable to set the value. The ssis variable is being used in a file system task to create a copy of an excel template and renaming it in the following format Name_YYYYMMDD_hhmmss. I'm using the same ssis variable in the excel connection manager used in the destination task that gets executed after the file system task. My problem is that by the time the dataflow starts the ssis variable resets its value and the connection manager is then looking for a file that doesn't exist. Is there a way to make the ssis variable to only set its value once?

  • I got around it by setting the variables value using an EXE SQL task

  • What version of SSIS are you using? If 2012+ use an expression task to set your varible value to the expression you need. Something like:
    [@User::FileName] = {FileName}_{Your Date Expression}.xlsx

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

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

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