The code:
%macro psubpop;
ODS TAGSETS.EXCELXP file="T:\Folder\Outcomes 2019 ®ion..xml "
style=Htmlblue ;
ods tagsets.ExcelXP options
(embedded_titles='yes' embedded_footnotes='yes' ORIENTATION='Landscape' autofit_height='yes' sheet_interval='none' sheet_name="700");;
PROC REPORT DATA=All_Sti3 nowd headline headskip;
COLUMN outcomes outcome upstate ®ion. ;
define outcomes/display ' ' order style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.8in cellheight=30};
define outcome/display 'Outcome' order order=DATA style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=4in cellheight=30};
define upstate/display 'UPSTATE' style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.2in cellheight=30};
define ®ion./display "®ion." style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.4in cellheight=30};
title1 height=10pt bold justify=left "Outcomes ~(super 1) January-December 2019 ";
where DIAGNOSIS='ES' and pop='M';
RUN;
PROC REPORT DATA=All_Sti3 nowd headline headskip;
COLUMN outcomes outcome upstate ®ion. ;
define outcomes/display ' ' group style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.8in cellheight=30};
define outcome/display 'Outcome' order order=DATA style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=4in cellheight=30};
define upstate/display 'UPSTATE' style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.2in cellheight=30};
define ®ion./display "®ion." style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.4in cellheight=30};
title1 height=10pt bold justify=left "Outcomes2 ~{super 8} January-December 2019";
where DIAGNOSIS='ES' and pop='F';
footnote1 height=8pt justify=left
"~{super 1}OP's ";
footnote2 height=8pt justify=left
"~{super 2}Number and percent of case assignments are based on report year ";
footnote3 height=8pt justify=left
"~{super 3}Testing ";
footnote4 height=8pt justify=left
"~{super 4}PrEP:Referral are calculated by excluding Current ";
RUN;
ods tagsets.excelxp close;
%mend;
%psubpop;
%macro psubpop;
ODS TAGSETS.EXCELXP file="T:\Folder\Outcomes 2019 ®ion..xml "
style=Htmlblue ;
ods tagsets.ExcelXP options
(embedded_titles='yes' embedded_footnotes='yes' ORIENTATION='Landscape' autofit_height='yes' sheet_interval='none' sheet_name="700");;
footnote;
title1 height=10pt bold justify=left "Outcomes ~(super 1) January-December 2019 ";
PROC REPORT DATA=All_Sti3 nowd headline headskip;
where DIAGNOSIS='ES' and pop='M';
COLUMN outcomes outcome upstate ®ion. ;
define outcomes/display ' ' order style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.8in cellheight=30};
define outcome/display 'Outcome' order order=DATA style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=4in cellheight=30};
define upstate/display 'UPSTATE' style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.2in cellheight=30};
define ®ion./display "®ion." style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.4in cellheight=30};
RUN;
footnote1 height=8pt justify=left
"~{super 1}OP's ";
footnote2 height=8pt justify=left
"~{super 2}Number and percent of case assignments are based on report year ";
footnote3 height=8pt justify=left
"~{super 3}Testing ";
footnote4 height=8pt justify=left
"~{super 4}PrEP:Referral are calculated by excluding Current ";
PROC REPORT DATA=All_Sti3 nowd headline headskip;
where DIAGNOSIS='ES' and pop='F';
COLUMN outcomes outcome upstate ®ion. ;
define outcomes/display ' ' group style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.8in cellheight=30};
define outcome/display 'Outcome' order order=DATA style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=4in cellheight=30};
define upstate/display 'UPSTATE' style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.2in cellheight=30};
define ®ion./display "®ion." style(HEADER)={just=center font_weight=bold fontsize=2.8 vjust=bottom cellwidth=1.4in cellheight=30};
title1 height=10pt bold justify=left "Outcomes2 ~{super 8} January-December 2019";
RUN;
ods tagsets.excelxp close;
%mend;
%psubpop;
Something like this should work for you.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.