How to export to Excel with dynamic column names?

  • I'm working on some SSIS packages. The data is extracted by years loaded into a table - each year is processed separately.

    Part of the data extraction utilizes dynamic sql to create a table that has the year as part of some of the column names.

    How do I set up the Excel Destination in the data flow task to have dynamic column names?

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • WayneS (9/9/2010)


    I'm working on some SSIS packages. The data is extracted by years loaded into a table - each year is processed separately.

    Part of the data extraction utilizes dynamic sql to create a table that has the year as part of some of the column names.

    How do I set up the Excel Destination in the data flow task to have dynamic column names?

    Hi Wayne,

    The standard Data Flow Task pipeline is static at runtime. There is no way to change the columns dynamically. If you can use third-party solutions, check the commercial CozyRoc Data Flow Task Plus. One of the features is support for dynamic source and destination columns at runtime. We have posed a video which demonstrates the feature.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

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

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