<?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 Generating excel tabs in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generating-excel-tabs/m-p/4155#M1718</link>
    <description>Hi,&lt;BR /&gt;
How do I generate separate ODS html outputs as different tabs in an excel file.&lt;BR /&gt;
&lt;BR /&gt;
Example:&lt;BR /&gt;
-------------&lt;BR /&gt;
ODS html file = 'C:\abe\dee\xyz\123.xls';&lt;BR /&gt;
proc print data=something;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
ODS html file = 'C:\abe\dee\xyz\789.xls';&lt;BR /&gt;
proc print data=else;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
Now, instead of these ODS statements generating two separate xls files, I want both the outputs in different tabs of the same excel file.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your help &lt;BR /&gt;
- Einnor</description>
    <pubDate>Fri, 10 Aug 2007 19:46:48 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-08-10T19:46:48Z</dc:date>
    <item>
      <title>Generating excel tabs</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generating-excel-tabs/m-p/4155#M1718</link>
      <description>Hi,&lt;BR /&gt;
How do I generate separate ODS html outputs as different tabs in an excel file.&lt;BR /&gt;
&lt;BR /&gt;
Example:&lt;BR /&gt;
-------------&lt;BR /&gt;
ODS html file = 'C:\abe\dee\xyz\123.xls';&lt;BR /&gt;
proc print data=something;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
ODS html file = 'C:\abe\dee\xyz\789.xls';&lt;BR /&gt;
proc print data=else;&lt;BR /&gt;
run;&lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
Now, instead of these ODS statements generating two separate xls files, I want both the outputs in different tabs of the same excel file.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your help &lt;BR /&gt;
- Einnor</description>
      <pubDate>Fri, 10 Aug 2007 19:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generating-excel-tabs/m-p/4155#M1718</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-10T19:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Generating excel tabs</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generating-excel-tabs/m-p/4156#M1719</link>
      <description>Hi:&lt;BR /&gt;
  This is a good example of when you might consider a change to using the EXCELXP tagset:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS tagsets.excelxp file = 'C:\temp\multsheet.xls';&lt;BR /&gt;
  proc print data=sashelp.class;&lt;BR /&gt;
  run;&lt;BR /&gt;
   &lt;BR /&gt;
  proc print data=sashelp.shoes(obs=5);&lt;BR /&gt;
  run;&lt;BR /&gt;
  &lt;BR /&gt;
  proc freq data=sashelp.shoes;&lt;BR /&gt;
    tables region;&lt;BR /&gt;
  run;&lt;BR /&gt;
ods tagsets.excelxp close;&lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
  &lt;BR /&gt;
That because when you use Spreadsheet Markup Language (Microsoft's XML specification for a Workbook defined in XML tags), there is one &amp;lt;Workbook&amp;gt; tag in the XML file and every worksheet is contained within separate &amp;lt;Worksheet&amp;gt; tags. The ODS developers followed the Microsoft specification -- so by default, when you switch to TAGSETS.EXCELXP to create your XML file, every procedure invocation that you have inside the ODS "sandwich" becomes a separate Excel worksheet tab in one workbook. ODS puts in the right combination of &amp;lt;Workbook&amp;gt; and &amp;lt;Worksheet&amp;gt; tags&lt;BR /&gt;
 &lt;BR /&gt;
On the other hand,  by Microsoft design/spec., when you create an HTML file, every HTML file becomes a separate Workbook -- unless you do something extra to link the HTML files together and store them in the same physical directory and have a separate external XML file that describes the files that get linked together. This is a more complicated method to get multiple tabs, but it is what you used to have to do in SAS 8 before TAGSETS.EXCELXP was available. That method is described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/excel/multisheet_excel_post.ppt" target="_blank"&gt;http://support.sas.com/rnd/base/topics/excel/multisheet_excel_post.ppt&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
For more information on ODS MARKUP and TAGSETS.EXCELXP, refer to ODS MARKUP resources site:&lt;BR /&gt;
 &lt;A href="http://support.sas.com/rnd/base/topics/odsmarkup/" target="_blank"&gt;http://support.sas.com/rnd/base/topics/odsmarkup/&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
and this paper has a good introduction to the topic:&lt;BR /&gt;
&lt;A href="http://support.sas.com/rnd/base/topics/odsmarkup/Paper_227-2007_ODS_Office.pdf" target="_blank"&gt;http://support.sas.com/rnd/base/topics/odsmarkup/Paper_227-2007_ODS_Office.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Fri, 10 Aug 2007 22:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Generating-excel-tabs/m-p/4156#M1719</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-08-10T22:51:28Z</dc:date>
    </item>
  </channel>
</rss>

