Export to Multiple Worksheets / Tabs in Excel ?

  • I am able to use an SSIS package to export from a SQL table and create an Excel spreadsheet and assign the Tab name.

    But I would like to export to multiple tabs within the same spreadsheet.

    For example, SELECT Fld1, Fld2 ,FLD3  from My_Table WHERE Color = 'BLUE'

    SELECT Fld1, Fld2 ,FLD3  from My_Table WHERE Color = 'RED'

    SELECT Fld1, Fld2 ,FLD3  from My_Table WHERE Color = 'GREEN'

    I could have 3 SSIS packages, or 1 SSIS package with 3 steps.

    But how can I create 3 tabs in an existing spreadsheet ?    1 for each color ?

    I get an error trying to export to a new tab, because the spreadsheet already exists

    • This topic was modified 2 years, 11 months ago by  homebrew01.
    • This topic was modified 2 years, 11 months ago by  homebrew01.
    • This topic was modified 2 years, 11 months ago by  homebrew01.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I was able to do it in SSIS by creating a separate "Preparation Task" and  "Data Flow" task for each Excel spreadsheet tab.

    • This reply was modified 2 years, 11 months ago by  homebrew01.
  • Thanks for following up with how you solved this!

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

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