﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / SQL Server 2005 General Discussion  / multi queries result to different excel sheets / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 22 May 2013 12:45:58 GMT</lastBuildDate><ttl>20</ttl><item><title>multi queries result to different excel sheets</title><link>http://www.sqlservercentral.com/Forums/Topic639119-149-1.aspx</link><description>Hi,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 code:EXEC msdb.dbo.sp_send_dbmail    @profile_name = 'PMDBOSW',    @recipients = 'nswetha03@gmail.com',    @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......</description><pubDate>Mon, 19 Jan 2009 00:52:30 GMT</pubDate><dc:creator>nswetha03</dc:creator></item></channel></rss>