<?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: ODS Excelxp PROC TABULATE multiple sheets in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359394#M18622</link>
    <description>&lt;P&gt;Follow up if you don't know: do you think there's a way to name each sheet what the&amp;nbsp;variable in the 'page' group is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example it's (all sex) so 3 sheets are being properly produced "Tabulate 1 - Table 1"; "Tabulate 2 - Table 1"; "Tabulate 3 - Table 1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get it "All"; "Male"; "Female" (to correspond with the variable values)?&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 14:39:43 GMT</pubDate>
    <dc:creator>fieldsa83</dc:creator>
    <dc:date>2017-05-17T14:39:43Z</dc:date>
    <item>
      <title>ODS Excelxp PROC TABULATE multiple sheets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359181#M18617</link>
      <description>&lt;P&gt;Hi I have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC TABULATE data=have;&lt;/P&gt;&lt;P&gt;class date var1 var2 var3;&lt;/P&gt;&lt;P&gt;var age;&lt;/P&gt;&lt;P&gt;weight finalwt;&lt;/P&gt;&lt;P&gt;table (all var2),(all var1)*(all var3),date*age*(median);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it creates a 'page; for each var2. How can I get each of these 'pages' as a separate sheet in an excel output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 20:07:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359181#M18617</guid>
      <dc:creator>fieldsa83</dc:creator>
      <dc:date>2017-05-16T20:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excelxp PROC TABULATE multiple sheets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359190#M18618</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt; We need to see your code, ALL the code that you've tried, including ODS statements.&lt;BR /&gt;&lt;BR /&gt; Using ODS EXCEL (if you have SAS 9.4) to create an .XLSX file or ODS TAGSETS.EXCELXP to create a .XML file are the 2 easiest ways to do what you want. However, you need to tell us how you are currently creating output (your ODS statements) in order to explain.&lt;BR /&gt;&lt;BR /&gt;cynthia&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Here's a simple example using SASHELP.SHOES that illustrates using ODS EXCEL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file='c:\temp\mult_sheet.xlsx'
    options(sheet_interval='table');
proc tabulate data=sashelp.shoes;
where region in ('Asia', 'Pacific');
 class region product;
 var sales;
 table all region,
       product all,
	   sales*(min mean sum max);
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 20:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359190#M18618</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-05-16T20:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excelxp PROC TABULATE multiple sheets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359201#M18621</link>
      <description>&lt;P&gt;Actually wow, this worked! It &amp;nbsp;created separate sheets for each 'page'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this is the first time&amp;nbsp;I've managed to get something to work first shot in SAS!&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 20:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359201#M18621</guid>
      <dc:creator>fieldsa83</dc:creator>
      <dc:date>2017-05-16T20:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excelxp PROC TABULATE multiple sheets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359394#M18622</link>
      <description>&lt;P&gt;Follow up if you don't know: do you think there's a way to name each sheet what the&amp;nbsp;variable in the 'page' group is?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example it's (all sex) so 3 sheets are being properly produced "Tabulate 1 - Table 1"; "Tabulate 2 - Table 1"; "Tabulate 3 - Table 1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get it "All"; "Male"; "Female" (to correspond with the variable values)?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 14:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359394#M18622</guid>
      <dc:creator>fieldsa83</dc:creator>
      <dc:date>2017-05-17T14:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excelxp PROC TABULATE multiple sheets</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359531#M18628</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Well, you'll have to generate the "All" table separately and then use BY group processing for the sheet naming,as shown below.&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;P&gt;Otherwise, you only choice is to macro-ize your program so that you can create 3 tables and use a macro variable for the sheet_name suboption.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.shoes out=twoshoes;
  by region;
  where region in ('Asia', 'Pacific');
run;

ods excel file='c:\temp\mult_sheet2.xlsx'
    options(sheet_interval='table' sheet_name='All');
proc tabulate data=twoshoes;
 class product;
 var sales;
 table product all,
	   sales*(min mean sum max)/ box = 'Asia and Pacific';
run;

options nobyline;
ods excel options(sheet_interval='table' sheet_name='#ByVal1' suppress_bylines='on');
proc tabulate data=twoshoes;
where region in ('Asia', 'Pacific');
by region;
 class region product;
 var sales;
 table product all,
	   sales*(min mean sum max);
run;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;here's what the sheets look like:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8936i329E7EC84D5A7B07/image-size/original?v=1.0&amp;amp;px=-1" alt="name_sheets.png" title="name_sheets.png" border="0" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 01:33:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359531#M18628</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2017-05-18T01:33:42Z</dc:date>
    </item>
  </channel>
</rss>

