Need Help in Exporting Data from SQL Server to Multiple Excel files

  • Hi - I have a table that contains a list of members from different states as follows:

    id  State  Lastname  firstname  address

     1   MA      david       john        address

     2   NJ        donald     tim         address

    etc, etc ....

    I need to export to data out into multiple Excel Workbooks for each State and I need to dynamically rename the workbook by the state code. How do I do this in DTS.

     

    Thanks Very Much

     

    Zack

  • Anybody?

  • DTS experts are not common on this board... might have to wait untill tomorrow when the message gets posted in the newsletter!

  • Waiting for the daily email will pay off for you.

    Using an Active-X control in your DTS will give you access to the Excel Objects.  From there you will be able to name sheets, format columns and insert recordsets.

    I suggest searching on SQLDTS.com.  That's where I learned to do exactly what you are inquiring about.

    If that doesn't turn anything up for you repost here and I can dig thru my old code and find what you need.

    Regards,
    Matt

  • Thanks Matt. I checked SQLDTS.com and I couldn't find anything that describes how to do this. I figure it is some sort of a package that loops through a record set and exports data based on a criteria. Any help is much appreciated.Thanks

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

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