I have three different queries and should get populated to three different excel sheets in the same excel work book...
i was able to send 3 queries result to single excel sheet using sp_send_dbmail
@profile_name = 'PMDBOSW',
@recipients = 'firstname.lastname@example.org',
@query ='set nocount on; exec dbo.SEND_THIS_MAIL; set nocount off;',
@subject = 'Work Order Count',
@attach_query_result_as_file = 1,
@query_attachment_filename ='D:\SWETHA.XLS' ;
SEND_THIS_MAIL is a proc which returns the multi query result set.
let me know the procedure if it can be done......