Excel and SSIS When the Sheet name is unknows

  • I'm importing an Excel workbook into SQL with SSIS, and its working just fine. 

    But ocassionally the sheet name gets changes and then I've got to change the SSIS to work with the new file. 

    Is there a way for SSIS to take whatever the first sheet in a workbook is and us that no matter what the name is??

     

  • You can loop over the sheets using a for each loop container.

    http://technet.microsoft.com/en-us/library/ms345182(SQL.90).aspx

    You could also use a SQL task and query the file using JET and loop over the record set. Your query would be Select top 1 From ....

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

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

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