<?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: how to concatenate proc reports into one excel file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696354#M212679</link>
    <description>&lt;P&gt;ods tagsets.excelxp options(sheet_interval="NONE");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 22:19:30 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-11-03T22:19:30Z</dc:date>
    <item>
      <title>how to concatenate proc reports into one excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696342#M212672</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a patient profile listing. Original program is output in PDF but now I have to convert it into excel, but when I use ods excel, it creates multiple sheets in the excel file instead of one sheet. Is there a way I can concatenate the proc reports?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;original code in ods pdf:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO profile;
	%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 listing close;
		ods html close;
		ods escapechar='^';
		ods pdf file = "..\..\Patient Profile Subject &amp;amp;select_subj..pdf" startpage=no style= TLF_CN_9;
		option formchar="|----|+|---+=|-/\&amp;lt;&amp;gt;*" ls=70 ps=70 missing = " " nobyline nocenter nodate nonumber orientation=landscape;
		title; 
		title1 j=l "4" j=r "DNDI-Master";
		title2 j=l ")" j=r "Page ^{thispage} of ^{lastpage}";
		title3 j=c " ";
		title4 j=c "Patient Profile";
		title5;
		title6 j=l "Subject:&amp;amp;select_subj. 	";

		footnote;
		footnote1 j=l " ";
		footnote2 j=l " ";
		footnote3 j=l " ";
		footnote4 j=c "Patient Profile";
		footnote5 j=l "Program Name: &amp;amp;prname." j=c "Dataset Extraction Date: (&amp;amp;datextrt.)" j=r "Generation Date/Time: %sysfunc(today(), yymmdd10)/&amp;amp;systime.";

		*****	dm report	********;
		proc report data = raw.demographics (where=(sub_profile_id="&amp;amp;select_subj.")) split = "|" spacing = 3 missing nowindows headline headskip style(header)={textalign=l} spanrows;
			columns ("Dataset(s) : Demographics, Informedconsentconsenteme_2" sub_profile_id dsstdat version_id icprsubj age sex_decode race);
		
			define sub_profile_id /group left width = 38 "Subject ID";
			define dsstdat /display left width = 40 "Informed Consent Date|/dsstdat";
			define version_id /display left width = 40 "Protocol Version Number|/version_id";
			define icprsubj /display left width = 40 "Previous Subject Number|/icprsubj";
			define age /display left width = 40 "Age|/icprsubj";
			define sex_decode /display left width = 40 "Gender|/sex_decode";
			define race /display left width = 20 "Race|/multi vars";
		run;


       *****	Adverse events report	********;
		proc report data = raw.adverse_events (where=(sub_profile_id="&amp;amp;select_subj.")) split = "|" spacing = 3 missing nowindows headline headskip style(header)={textalign=l} spanrows;
			columns ("Dataset(s) : Adverse_events" aestdtc aeendtc interval_name_ aeterm aeongo_decode aesev_decode aefrq_decode);
					
			define aestdtc /display left width = 2 "Start Date|/aestdtc";
			define aeendtc /display left width = 2 "End Date|/aeendtc";
			define interval_name /display left width = 2 "interval Name|/interval_name";
			define aeterm /display left width = 2 "Adverse Event Term|/aeterm";
			define aeongo_decode /display left width = 20 "Ongoing?|/aeongo_decode";
			define aesev_decode /display left width = 2 "Severity|/aesev_decode";
			define aefrq_decode /display left width = 2 "Pattern|/aefrq_decode";
		run;

ods pdf close;

%end;
%mend profile;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:58:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696342#M212672</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2020-11-03T22:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate proc reports into one excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696346#M212673</link>
      <description>&lt;P&gt;Try ODS option sheet_interval = "NONE".&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696346#M212673</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-03T22:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate proc reports into one excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696350#M212676</link>
      <description>&lt;P&gt;Like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;	options;
		ods listing close;
		ods escapechar='^';
		ods tagsets.ExcelXP file="..\..\DM\MMPlisting_report\Patient Profile Subject &amp;amp;select_subj..xml" style=statistical;
		&lt;FONT face="arial black,avant garde"&gt;&lt;STRONG&gt;ODS option sheet_interval = "NONE";&lt;/STRONG&gt;&lt;/FONT&gt;
	*	ods html close;
		
	*	ods pdf file = "..\..\ICON GPHS\Biostatistics - Documents\Clinical Trials\4418-0006 01-COV\DM\MMPlisting_report\Patient Profile Subject &amp;amp;select_subj..pdf" startpage=no style= TLF_CN_9;
		option formchar="|----|+|---+=|-/\&amp;lt;&amp;gt;*" ls=70 ps=70 missing = " " nobyline nocenter nodate nonumber orientation=landscape;
		title; 
		title1 j=l "4418-0006 01-COV (MASTER)" j=r "DNDI-Master";
		title2 j=l "Protocol No.: 01-COV (MASTER)" j=r "Page ^{thispage} of ^{lastpage}";
		title3 j=c " ";
		title4 j=c "Patient Profile";
		title5;
		title6 j=l "Subject:&amp;amp;select_subj. 	";

		footnote;
		footnote1 j=l " ";
		footnote2 j=l " ";
		footnote3 j=l " ";
		footnote4 j=c "Patient Profile - MMB Request";
		footnote5 j=l "Program Name: &amp;amp;prname." j=c "Dataset Extraction Date: (&amp;amp;datextrt.)" j=r "Generation Date/Time: %sysfunc(today(), yymmdd10)/&amp;amp;systime.";

		*****	dm report	********;
		ods tagsets.excelxp options(sheet_name="demographics");

		proc report data = dmlst.demographics (where=(sub_profile_id="&amp;amp;select_subj.")) split = "|" spacing = 3 missing nowindows headline headskip style(header)={textalign=l} spanrows;
			columns ("Dataset(s) : Demographics, Informedconsentconsenteme_2" sub_profile_id dsstdat version_id icprsubj age sex_decode race);
		
			define sub_profile_id /group left width = 38 "Subject ID";
			define dsstdat /display left width = 40 "Informed Consent Date|/dsstdat";
			define version_id /display left width = 40 "Protocol Version Number|/version_id";
			define icprsubj /display left width = 40 "Previous Subject Number|/icprsubj";
			define age /display left width = 40 "Age|/icprsubj";
			define sex_decode /display left width = 40 "Gender|/sex_decode";
			define race /display left width = 20 "Race|/multi vars";
		run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696350#M212676</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2020-11-03T22:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate proc reports into one excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696354#M212679</link>
      <description>&lt;P&gt;ods tagsets.excelxp options(sheet_interval="NONE");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696354#M212679</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-11-03T22:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to concatenate proc reports into one excel file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696359#M212683</link>
      <description>awesome that worked, but now how do i create different sheet per subject? thanks!</description>
      <pubDate>Tue, 03 Nov 2020 22:49:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-concatenate-proc-reports-into-one-excel-file/m-p/696359#M212683</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2020-11-03T22:49:16Z</dc:date>
    </item>
  </channel>
</rss>

