<?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.  create combine multiple proc reports in one sheet &amp;amp; create multiple sheet per subject in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696677#M212833</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program with multiple proc reports and need to create one excel workbook that is concatenating all proc reports per subject per sheet.&amp;nbsp; I'm either able to output one sheet containing all subjects and all proc reports OR one sheet per subject with ONE proc report.&amp;nbsp; I believe my ods option (&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_interval="NONE"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/CODE&gt; &amp;amp; "&lt;CODE class=" language-sas"&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_name="&amp;amp;select_subj."&lt;/FONT&gt;&lt;/CODE&gt;) is interfering with each other. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MACRO ptpf;

	 ods listing close;
      ods escapechar='^';
      ods excel options(&lt;STRONG&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_interval="NONE"&lt;/FONT&gt;&lt;/STRONG&gt;) file="excel.xls";

	%do i=1  %to &amp;amp;subj_n.;
		%let select_subj = %scan(&amp;amp;subj., &amp;amp;i., '#');  *Creating macro variables to select patients one by one;
	
		options;
		ods excel options(&lt;FONT face="arial black,avant garde"&gt;sheet_name="&amp;amp;select_subj."&lt;/FONT&gt;) ;
&lt;BR /&gt;        /*****PROC REPORT******/
        proc report data =a;
        run;

        proc report data =b;
        run;

       proc report data =c;
       run;

     %end;&lt;BR /&gt;
ods excel close;
%mend ptpf;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 04 Nov 2020 21:00:40 GMT</pubDate>
    <dc:creator>HitmonTran</dc:creator>
    <dc:date>2020-11-04T21:00:40Z</dc:date>
    <item>
      <title>ods excel.  create combine multiple proc reports in one sheet &amp; create multiple sheet per subject</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696677#M212833</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program with multiple proc reports and need to create one excel workbook that is concatenating all proc reports per subject per sheet.&amp;nbsp; I'm either able to output one sheet containing all subjects and all proc reports OR one sheet per subject with ONE proc report.&amp;nbsp; I believe my ods option (&lt;CODE class=" language-sas"&gt;&lt;STRONG&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_interval="NONE"&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/CODE&gt; &amp;amp; "&lt;CODE class=" language-sas"&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_name="&amp;amp;select_subj."&lt;/FONT&gt;&lt;/CODE&gt;) is interfering with each other. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;MACRO ptpf;

	 ods listing close;
      ods escapechar='^';
      ods excel options(&lt;STRONG&gt;&lt;FONT face="arial black,avant garde"&gt;sheet_interval="NONE"&lt;/FONT&gt;&lt;/STRONG&gt;) file="excel.xls";

	%do i=1  %to &amp;amp;subj_n.;
		%let select_subj = %scan(&amp;amp;subj., &amp;amp;i., '#');  *Creating macro variables to select patients one by one;
	
		options;
		ods excel options(&lt;FONT face="arial black,avant garde"&gt;sheet_name="&amp;amp;select_subj."&lt;/FONT&gt;) ;
&lt;BR /&gt;        /*****PROC REPORT******/
        proc report data =a;
        run;

        proc report data =b;
        run;

       proc report data =c;
       run;

     %end;&lt;BR /&gt;
ods excel close;
%mend ptpf;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 04 Nov 2020 21:00:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696677#M212833</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2020-11-04T21:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel.  create combine multiple proc reports in one sheet &amp; create multiple sheet per su</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696680#M212835</link>
      <description>&lt;P&gt;Please rewrite this sentence fragment so that it makes sense:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;concatenating all proc reports in one sheet per subject while having multiple sheet per subject.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;"one sheet per subject" and "multiple sheet per subject" does not make sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one of these is "one sheet per topic" and "multiple sheets per person" or similar then say so. But using the same word "subject" may be obscuring what you intend.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best might be to manually create an example work book that demonstrates what you want.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 20:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696680#M212835</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-04T20:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel.  create combine multiple proc reports in one sheet &amp; create multiple sheet per su</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696688#M212838</link>
      <description>ok i reworded, does it make sense?</description>
      <pubDate>Wed, 04 Nov 2020 21:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696688#M212838</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2020-11-04T21:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: ods excel.  create combine multiple proc reports in one sheet &amp; create multiple sheet per su</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696704#M212848</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/111564"&gt;@HitmonTran&lt;/a&gt;&amp;nbsp; - Here is a test program that I know works for doing multiple sheets in the same workbook. You should be able to run this yourself. You can then apply the same approach to your own code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = "Test1.xls";

ods excel options(sheet_interval="NONE" sheet_name="Males");

proc print data= sashelp.class;
  where sex = 'M';
run;

ods excel options(sheet_interval="NONE" sheet_name="Females");

proc print data= sashelp.class;
  where sex = 'F';
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Nov 2020 22:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-excel-create-combine-multiple-proc-reports-in-one-sheet-amp/m-p/696704#M212848</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-04T22:13:42Z</dc:date>
    </item>
  </channel>
</rss>

