<?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 ODS Excel And Tabulate: Sheet Name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438780#M109432</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple proc tabulate and ODS EXCEL to export to MS Excel. The result has a sheet by every segment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I configure the&amp;nbsp;ODS Excel statement to have a segment name as sheet name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current SAS code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="/path/File_Test.xlsx"&amp;nbsp; options(sheet_interval='page');
&amp;nbsp; &amp;nbsp; PROC TABULATE DATA=WORK.Test ; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLASS Name Segment&amp;nbsp; &amp;amp;columnas / ORDER=UNFORMATTED MISSING;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TABLE Segment, &amp;amp;columnas, Name*ColPctN ;
&amp;nbsp; &amp;nbsp; RUN;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But as results each sheet is named: Tabulate 1 - Table 1, Tabulate 2 - Table 1, etc. Please see the attached file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Tue, 20 Feb 2018 20:27:11 GMT</pubDate>
    <dc:creator>MariaD</dc:creator>
    <dc:date>2018-02-20T20:27:11Z</dc:date>
    <item>
      <title>ODS Excel And Tabulate: Sheet Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438780#M109432</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple proc tabulate and ODS EXCEL to export to MS Excel. The result has a sheet by every segment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I configure the&amp;nbsp;ODS Excel statement to have a segment name as sheet name?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current SAS code is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="/path/File_Test.xlsx"&amp;nbsp; options(sheet_interval='page');
&amp;nbsp; &amp;nbsp; PROC TABULATE DATA=WORK.Test ; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CLASS Name Segment&amp;nbsp; &amp;amp;columnas / ORDER=UNFORMATTED MISSING;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TABLE Segment, &amp;amp;columnas, Name*ColPctN ;
&amp;nbsp; &amp;nbsp; RUN;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But as results each sheet is named: Tabulate 1 - Table 1, Tabulate 2 - Table 1, etc. Please see the attached file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2018 20:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438780#M109432</guid>
      <dc:creator>MariaD</dc:creator>
      <dc:date>2018-02-20T20:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel And Tabulate: Sheet Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438797#M109442</link>
      <description>Hi, if you switch to BY group processing and use a BY instead of a page, then you can use the #byval for the sheet_name, as shown in this previous posting: &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359181/highlight/true#M18617" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excelxp-PROC-TABULATE-multiple-sheets/m-p/359181/highlight/true#M18617&lt;/A&gt; -- there is an ODS EXCEL example in the posting on 5-17 that shows using #BYVAL to name the sheets.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 20 Feb 2018 20:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438797#M109442</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-02-20T20:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel And Tabulate: Sheet Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438798#M109443</link>
      <description>&lt;P&gt;Try the Sheet_Label and Sheet_name options in the ODS EXCEL statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find a lot of examples online using ODS TAGSETS which is the same approach you need for ODS EXCEL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html#data" target="_blank"&gt;https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html#data&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p09n5pw9ol0897n1qe04zeur27rv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#optCatLstn1cqtteamm3qpwn1req58g3f4nkj" target="_blank"&gt;http://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p09n5pw9ol0897n1qe04zeur27rv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#optCatLstn1cqtteamm3qpwn1req58g3f4nkj&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting some weird behaviour but maybe this will work for you:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.cars out=cars;
by origin;
run;

ods excel file="c:\_localdata\temp.xlsx" options(sheet_interval="bygroup" sheet_label='');

proc print data=cars;
by origin;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Feb 2018 20:57:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438798#M109443</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-20T20:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel And Tabulate: Sheet Name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438931#M109474</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;, works perfect!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 14:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-And-Tabulate-Sheet-Name/m-p/438931#M109474</guid>
      <dc:creator>MariaD</dc:creator>
      <dc:date>2018-02-21T14:15:33Z</dc:date>
    </item>
  </channel>
</rss>

