I have SAS code:
ODS LISTING CLOSE;
ods excel file="/mnt/nfs/prod/Sched/OpsDeptData/Operations/Reports/LTSS/TEST_HDM.xlsx"
style=Print;
ods excel options(
sheet_name =' HDM_PROVIDERS'
embedded_titles='yes'
EMBEDDED_FOOTNOTES= 'Yes'
sheet_interval="none"
orientation='landscape');
Title 'HDM Provider Monthly Report'
RUN;
%MACRO vLOB(vName1);
PROC PRINT DATA=HDM_PROVIDER_&vName1.TRANS NOOBS;
RUN;
%mend vLOB;
%vLOB(0100);
%vLOB(5400);
%vLOB(5410);
%vLOB(7100);
%vLOB(7200);
ODS _ALL_ CLOSE;
I need title only appears once not multiple times.
Couldn't you just turn it off? e.g.:
title1 'HDM Provider Monthly Report' ;
%vLOB(0100)
title1; *Clear title;
%vLOB(5400)
%vLOB(5410)
%vLOB(7100)
%vLOB(7200)
Oh, I see, Should be related with ods title option ?
Hi,
It is a sub-option just like embedded_titles or sheet_interval or sheet_name. If you look here
http://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p09n5pw9ol0897n1qe04zeur27rv.htm&docset...
and search, you should see: EMBED_TITLES_ONCE='on' as a sub-option and you specify it just like you did the other sub-options in your code:
ods excel file=". . ./TEST_HDM.xlsx"
style=Print
options(sheet_name =' HDM_PROVIDERS'
embedded_titles='yes'
embed_titles_once='on'
EMBEDDED_FOOTNOTES= 'Yes'
sheet_interval="none"
orientation='landscape');
There are also separate options for print headers and footers that are visible when the sheet is printed.
Cynthia
Dose not work even added option.
ODS LISTING CLOSE;
ods excel file="/mnt/nfs/prod/Sched/OpsDeptData/Operations/Reports/LTSS/TEST_HDM.xlsx"
style=Print;
ods excel options(
sheet_name =' HDM_PROVIDERS'
embedded_titles='YES'
embed_titles_once='ON'
sheet_interval="none"
orientation='landscape'
);
RUN;
title 'TEST';
%MACRO vLOB(vName1);
PROC PRINT DATA=HDM_PROVIDER_&vName1.TRANS NOOBS;
RUN;
%mend vLOB;
%vLOB(0100);
%vLOB(5400);
%vLOB(5410);
%vLOB(7100);
%vLOB(7200);
ODS _ALL_ CLOSE;
Couldn't you just turn it off? e.g.:
title1 'HDM Provider Monthly Report' ;
%vLOB(0100)
title1; *Clear title;
%vLOB(5400)
%vLOB(5410)
%vLOB(7100)
%vLOB(7200)
thanks, this one works.
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.