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)
BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: 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)
BASUG is hosting free webinars Next up: Mike Sale presenting Data Warehousing with SAS April 10 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

thanks, this one works.

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4336 views
  • 2 likes
  • 3 in conversation