cwadams1955
Programmer
I have an existing stored procedure which runs 4 concatenated SQL SELECT statements, like this:
EXEC(@SqlState1 + @SqlState2 + @SqlState3 + @SqlState4)
It builds and returns the dataset just fine. But now I have a need to send this dataset to an Excel spreadsheet. I know how to use DTS to export table data, and I've found lots of info on using DTS to export a view or a single SQL statement. But is there an easy way to have DTS run this stored proc and send the resulting dataset to an Excel file? Or would I have to rewrite the procedure so that it does this task (which I'd rather not do, if I can avoid it.) Thanks.
EXEC(@SqlState1 + @SqlState2 + @SqlState3 + @SqlState4)
It builds and returns the dataset just fine. But now I have a need to send this dataset to an Excel spreadsheet. I know how to use DTS to export table data, and I've found lots of info on using DTS to export a view or a single SQL statement. But is there an easy way to have DTS run this stored proc and send the resulting dataset to an Excel file? Or would I have to rewrite the procedure so that it does this task (which I'd rather not do, if I can avoid it.) Thanks.