Export queries output to different worksheets of the same Excel file

  • Hi,

    I have a need of exporting the queries output to the different(corresponding query) worksheets of the same excel file.

    I tried sqlcmd but queries cannot export to different worksheet of same excel. And problem in OPENROWSET is that I have to create heading(column name) of the all queries.

    Is anyone have solution regarding this.

  • SSIS does this easily. You specify which sheet to export to in your Excel Destination object in a Data Flow definition.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I'm old school.

    I do this for clients and use vb6 to not only populate excel spreadsheets, but I also can apply any number format requests and then email the file to the end user.


    Living in Paradise: N 34°16'07.99" W 119°12'17.58"

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

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