<?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: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274497#M16000</link>
    <description>&lt;P&gt;If you use the XML extension then you avoid being prompted by Excel when double clicking on the file to open it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you can include a sheet name. If you add a new ODS statement with a new sheet name part way through your PROC steps then following steps will go into the new sheet / tab.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2016 21:38:05 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2016-06-01T21:38:05Z</dc:date>
    <item>
      <title>Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274459#M15992</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to export results from a PROC PRINT&amp;nbsp;step, and mulitple PROC MEANS&amp;nbsp;steps (analyses of different class variables) to individual Excel worksheets within an Excel workbook. I would also like to include output from multiple procedures to a single worksheet. For example, I would like to export output from a PROC MEANS&amp;nbsp;step and results from a PROC SGPLOT&amp;nbsp;step (to build a histogram with the variable from the VAR statement in the proc means step) to a single Excel worksheet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried variations of ODS and PROC EXPORT steps but have not been able to get the worksheets exactly how I want them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eddie&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 19:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274459#M15992</guid>
      <dc:creator>ECHIA78</dc:creator>
      <dc:date>2016-06-01T19:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274462#M15993</link>
      <description>&lt;P&gt;If you taking output from various procedures, including those that don't produce datasets then ODS is the way to go. What ODS methods have you tried? I'm guessing you may be using the EXCELXP tagset. If this is the case then you need to put your multiple procs inside a single ODS file creation step, assuming in this case everything goes in the same sheet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.excelxp file="MyExcel.xml" options(sheet_interval="NONE");

proc print;
run;

proc means;
run;

proc print;
run;

ods tagsets.excelxp close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suggest you start with something simple like the above and then enhance it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 20:07:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274462#M15993</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-06-01T20:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274464#M15994</link>
      <description>ODS TAGSETS.Excelxp with the options (sheet_interval= ). Insert statement with just ODS TAGSETS.EXCELXP OPTIONS(SHEET_INTERVAL= ); to change behavior at that point in the process. us NONE before procedures going to same page; PROC to send next procedure to new sheet.  May be disappointed with SGPLOT output though as Excelxp is not for images.</description>
      <pubDate>Wed, 01 Jun 2016 20:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274464#M15994</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-01T20:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274478#M15995</link>
      <description>&lt;P&gt;If you have SAS 9.4+ you can use ODS Excel. The options are similar to Tagsets.excelxp.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 20:44:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274478#M15995</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-01T20:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274480#M15996</link>
      <description>&lt;P&gt;Thanks! I tried something similar. Do I have to use the XML extension? And I can go aheah and include the sheet_name option after the sheet_interval option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Eddie&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 20:50:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274480#M15996</guid>
      <dc:creator>ECHIA78</dc:creator>
      <dc:date>2016-06-01T20:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274482#M15997</link>
      <description>&lt;P&gt;Thanks for replying.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have. Can I use to the xlsx, csvall, or xls extension instead of xml? And how could I add a histogram to an Excel worksheet that already includes PROC MEANS output? Thanks, Eddie&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp file="M:\CLIENT SERVICES\Employee Folders\Eddie\Statistics.xml"&lt;BR /&gt;options (sheet_interval="NONE");&lt;/P&gt;&lt;P&gt;proc print data=work.report2;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc means data=work.report2;&lt;BR /&gt;var Total_Attributed;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods tagsets.excelxp close;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 20:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274482#M15997</guid>
      <dc:creator>ECHIA78</dc:creator>
      <dc:date>2016-06-01T20:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274493#M15999</link>
      <description>&lt;P&gt;Last time I checked Tagsets doesn't support graphics.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 21:34:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274493#M15999</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-01T21:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274497#M16000</link>
      <description>&lt;P&gt;If you use the XML extension then you avoid being prompted by Excel when double clicking on the file to open it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you can include a sheet name. If you add a new ODS statement with a new sheet name part way through your PROC steps then following steps will go into the new sheet / tab.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 21:38:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274497#M16000</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-06-01T21:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274502#M16001</link>
      <description>Thanks. Can you walk me through the ODS statement in the following code?&lt;BR /&gt;Especially the ODS statement leading up to the PROC MEANS step? The PROC&lt;BR /&gt;MEANS output is being appended to the first (and only) sheet rather than on&lt;BR /&gt;its own worksheet.&lt;BR /&gt;&lt;BR /&gt;ods excel file="M:\CLIENT SERVICES\Employee Folders\Eddie\Statistics\Dual&lt;BR /&gt;Feed Raw Data.xlsx"&lt;BR /&gt;options(sheet_interval="none"&lt;BR /&gt;sheet_name="Dual Feed Raw Data");&lt;BR /&gt;&lt;BR /&gt;ods text="Dual Feed Raw Data";&lt;BR /&gt;proc print data=work.report2;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;ods excel file="M:\CLIENT SERVICES\Employee Folders\Eddie\Statistics\Dual&lt;BR /&gt;Feed Raw Data.xlsx"&lt;BR /&gt;options(sheet_interval="none"&lt;BR /&gt;sheet_name="Average Total Attribution");&lt;BR /&gt;ods text="Average Total Attribution";&lt;BR /&gt;proc means data=work.report2;&lt;BR /&gt;var Total_Attributed;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Eddie&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Wed, 01 Jun 2016 22:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274502#M16001</guid>
      <dc:creator>ECHIA78</dc:creator>
      <dc:date>2016-06-01T22:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274508#M16002</link>
      <description>Hi:&lt;BR /&gt;  Reeza is correct. ODS TAGSETS.EXCELXP, ODS CSV, ODS CSVALL do not support graphics inclusion. Only ODS MSOFFICE2K (an HTML file) or ODS TAGSETS.MSOFFICE2K_X (also an HTML file) or ODS EXCEL (with 9.4) will allow you to include graphics.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Wed, 01 Jun 2016 22:45:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274508#M16002</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2016-06-01T22:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting SAS Procedures to Multiple Excel Worksheets within a Singe Excel Workbook</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274509#M16003</link>
      <description>&lt;P&gt;This code wouldn't work as is. Here's a draft, untested that would be closer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="M:\CLIENT SERVICES\Employee Folders\Eddie\Statistics\Dual
Feed Raw Data.xlsx"
options(sheet_interval="none"
sheet_name="Dual Feed Raw Data");

title "Dual Feed Raw Data";
proc print data=work.report2;
run;


options(sheet_interval="none"
sheet_name="Average Total Attribution");
title "Average Total Attribution";
proc means data=work.report2;
var Total_Attributed;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There's still a bug about getting sheet interval properly set up, see this post:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-excel-amp-multiple-sheets/m-p/261953/highlight/true#M15551" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-excel-amp-multiple-sheets/m-p/261953/highlight/true#M15551&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2016 22:45:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-SAS-Procedures-to-Multiple-Excel-Worksheets-within-a/m-p/274509#M16003</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-01T22:45:19Z</dc:date>
    </item>
  </channel>
</rss>

