Export result from dynamic crosstab sp to excel

  • I have a sp which which does a pivot and Stores the result in a table . Now, what i want to do is export the results to a excel file .i tried storing the DTS and executing it, but it works fine only on its first time. on subsequent execution on my sp as the table schmea changes , the DTS i created generates a error. i tried using bcp too , the problem is thought it exports the data but doesnt gives the column names ( As you know on a pivot report the column names will hold the key).

    is there anyway i can do this SQL SERVER. I repeat what am looking for is when i run my sp the results from the resultant table to be exported to a excel file(it would be better , if i can change the file name dynamically with the parameter suppled to the sp ) ?

  • I think you best bet would be to use Active Script to be able to refinfe the export dynamically. You can create an excel object and build the new structure you need, then fill. This can use the table as a guide to do it.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

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

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