BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

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)
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

View solution in original post

6 REPLIES 6
Cynthia_sas
SAS Super FREQ
Hi:
I believe there is an option to only embed titles once. You may need to refer to the documentation to verify.
Cynthia
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

Oh, I see, Should be related with  ods title option  ?

Cynthia_sas
SAS Super FREQ

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

JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

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;

 

Quentin
Super User

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)
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

thanks, this one works.

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 4736 views
  • 2 likes
  • 3 in conversation