Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:39:42+00:00 2026-05-29T06:39:42+00:00

Is it possible to create an SSIS package that can be passed a file

  • 0

Is it possible to create an SSIS package that can be passed a file (through a variable) and from the variable determine which Data Flow Task to use?

What I would like to be able to do is to create a single DTSX package that can take in a filename as a variable and detect (simply from the filename) if it is an Excel 2003, Excel 2007 or CSV file and from that, execute the correct Data Flow Task. I will then process the results in another single Data Flow Task after the data has been imported.

I used SSIS a long time ago and I am just coming back to using it so my knowledge is locked away and will come back slowly. I just can’t seem to remember (or find on Google) a way of creating a conditional split in the Control Flow.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:39:43+00:00Added an answer on May 29, 2026 at 6:39 am

    As HLGEM has indicated, as long as the internal structure was consistent, something like this would suffice.

    I’d declared a package level variable, DatFlowSelector and within my initial script task, I’d use logic to determine what path the flow should take based on the FileName variable you were going to use.

    control flow

    After wiring up the expected outputs, use the Precedence Constraint editor to determine what path evaluates to true. My logic was simply @[User::DataFlowSelector] == N where N maps to the value my script assigned.

    I generally switch the ShowAnnotation property to “ConstraintOptions” when I modify the constraints as it makes it immediately clear to future maintainers that there is something going on. SQL 2012 will help in this case as it assigns the fx glyph to the connector but displaying the logic can provide at-a-glance confirmation of sound logic.

    precedent constraint editor

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Create a variable in .CSS file for use within that .CSS file
It's possible to create digrams in SQL Server 2000 that can be useful to
Possible Duplicate: Create a date with T-SQL I've a data table that stores each
Possible Duplicate: How can I create a temp file with a specific extension with
Is it possible to run an SSIS package from a sql server agent job
Possible Duplicate: Create WPF TextBox that accepts only numbers How i can check if
Is that possible for BIDS to build a SSIS package on remote SQL Server
is that possible create an abstract class from DbQuery and IDbSet? I'm trying to
Possible Duplicate: Create new class from a Variable in Java I have a string
Possible Duplicate: Create Excel file in Java How to save output in excel format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.