<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to export two datasets into single work sheet in excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212478#M52471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tagsets is a good way to export to Excel.&amp;nbsp; I find it quick to tweak what I know to suit different requirements (e.g. apply formatting).&lt;/P&gt;&lt;P&gt;DDE is another technique but personally I found it a bit slow going as you have to define table ranges and locations specifically.&amp;nbsp; Worth reading up the coding though as it may prove handy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not attach the file for some reason, so I've pasted an example below for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***** EXCEL OUTPUT *******/&lt;/P&gt;&lt;P&gt;ods tagsets.ExcelXP&lt;/P&gt;&lt;P&gt;path= "###### type pathway here ##"&amp;nbsp; /* Pathway&amp;nbsp; ".....\...\..\.."&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;file="two datasets.xls" /* filename wil XLS extention */&lt;/P&gt;&lt;P&gt;style=printer;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Define the worksheet parameters */&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods tagsets.ExcelXP &lt;/P&gt;&lt;P&gt;&amp;nbsp; options(embedded_titles='yes' embedded_footnotes='yes' &lt;/P&gt;&lt;P&gt;&amp;nbsp; sheet_interval='none'&amp;nbsp; /* Sheet interval determines whether to print on to the same sheet or a new one. */&lt;/P&gt;&lt;P&gt;&amp;nbsp; sheet_name="Two datasets"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom='80' &lt;/P&gt;&lt;P&gt;&amp;nbsp; skip_space='5,0,0,0,3'&amp;nbsp;&amp;nbsp; /* Determines the number of rows between the two tables. */&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* You can embed style elements within the proc print */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Dataset 1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print data= sashelp.class &lt;/P&gt;&lt;P&gt;&amp;nbsp; width=minimum&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; label&lt;/P&gt;&lt;P&gt;&amp;nbsp; style (data) = [font_face=calibri just=left ]&amp;nbsp; noobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label&amp;nbsp; age = "^{style[just=center fontweight=bold] AGE of Pupil}";&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;title;footnote;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Dataset 2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print data= sashelp.fish (obs=100)&lt;/P&gt;&lt;P&gt;&amp;nbsp; width=minimum&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; label&lt;/P&gt;&lt;P&gt;&amp;nbsp; style (data) = [font_face=calibri just=left]&amp;nbsp; noobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;title;footnote;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Mar 2015 09:13:22 GMT</pubDate>
    <dc:creator>RB1Kenobi</dc:creator>
    <dc:date>2015-03-30T09:13:22Z</dc:date>
    <item>
      <title>how to export two datasets into single work sheet in excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212476#M52469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have two datasets for example sashelp.class1 sashelp.class2;&lt;/P&gt;&lt;P&gt;now i want to export these two datasets into excel within single work sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sheet1 contains first sashelp.class1 data and under sashelp.class2 data.&lt;/P&gt;&lt;P&gt;your valid comments are welcome.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 08:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212476#M52469</guid>
      <dc:creator>Ravikumarkummari</dc:creator>
      <dc:date>2015-03-30T08:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to export two datasets into single work sheet in excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212477#M52470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- combine the datasets into one using the data step or proc sql, and then export that&lt;/P&gt;&lt;P&gt;- use ODS TAGSETS.EXCELXP to write both datasets into a single sheet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 08:09:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212477#M52470</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-30T08:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to export two datasets into single work sheet in excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212478#M52471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tagsets is a good way to export to Excel.&amp;nbsp; I find it quick to tweak what I know to suit different requirements (e.g. apply formatting).&lt;/P&gt;&lt;P&gt;DDE is another technique but personally I found it a bit slow going as you have to define table ranges and locations specifically.&amp;nbsp; Worth reading up the coding though as it may prove handy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could not attach the file for some reason, so I've pasted an example below for you:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***** EXCEL OUTPUT *******/&lt;/P&gt;&lt;P&gt;ods tagsets.ExcelXP&lt;/P&gt;&lt;P&gt;path= "###### type pathway here ##"&amp;nbsp; /* Pathway&amp;nbsp; ".....\...\..\.."&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;file="two datasets.xls" /* filename wil XLS extention */&lt;/P&gt;&lt;P&gt;style=printer;&lt;/P&gt;&lt;P&gt;ods escapechar="^";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Define the worksheet parameters */&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods tagsets.ExcelXP &lt;/P&gt;&lt;P&gt;&amp;nbsp; options(embedded_titles='yes' embedded_footnotes='yes' &lt;/P&gt;&lt;P&gt;&amp;nbsp; sheet_interval='none'&amp;nbsp; /* Sheet interval determines whether to print on to the same sheet or a new one. */&lt;/P&gt;&lt;P&gt;&amp;nbsp; sheet_name="Two datasets"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom='80' &lt;/P&gt;&lt;P&gt;&amp;nbsp; skip_space='5,0,0,0,3'&amp;nbsp;&amp;nbsp; /* Determines the number of rows between the two tables. */&lt;/P&gt;&lt;P&gt;&amp;nbsp; );&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* You can embed style elements within the proc print */&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Dataset 1 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print data= sashelp.class &lt;/P&gt;&lt;P&gt;&amp;nbsp; width=minimum&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; label&lt;/P&gt;&lt;P&gt;&amp;nbsp; style (data) = [font_face=calibri just=left ]&amp;nbsp; noobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; label&amp;nbsp; age = "^{style[just=center fontweight=bold] AGE of Pupil}";&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;title;footnote;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* Dataset 2 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print data= sashelp.fish (obs=100)&lt;/P&gt;&lt;P&gt;&amp;nbsp; width=minimum&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; label&lt;/P&gt;&lt;P&gt;&amp;nbsp; style (data) = [font_face=calibri just=left]&amp;nbsp; noobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;title;footnote;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;ods listing;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 09:13:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-export-two-datasets-into-single-work-sheet-in-excel/m-p/212478#M52471</guid>
      <dc:creator>RB1Kenobi</dc:creator>
      <dc:date>2015-03-30T09:13:22Z</dc:date>
    </item>
  </channel>
</rss>

