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)

View solution in original post

6 REPLIES 6
Cynthia_sas
Diamond | Level 26
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
Diamond | Level 26

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)
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

thanks, this one works.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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