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

I am running SAS 9.4 and have an ODS Excel question. 

 

I have a footer that I want to see on 2 separate lines in the center section of my report footer.  In Excel I would use Shift+ Enter to achieve this carriage return.   How do I code this in SAS?

 

I want the first line of the footer to be "This material is..." and I want the next line of the footer to be "Any unauthorized use...".

 

My code is:

%let footer_text =%str(&CThis material is confidential and proprietary. Any unauthorized use, reproduction or transfer of these materials is strictly prohibited.&R&7Page &P of &N);

ods listing close; 
ods excel file="C:\test.xlsx";

ods excel options(sheet_name="Test"
embedded_titles='yes'
embedded_footnotes='yes'
print_footer="&footer_text"
Orientation = 'landscape');

PROC print DATA=test;
run;
 

ods excel close;
ods listing;
RUN;

 

1 ACCEPTED SOLUTION
2 REPLIES 2
KTaylor74
Calcite | Level 5

Thanks!

 

I used this for my footer and it worked great!

 

%let footer_text =%str(&C&7This material is confidential and proprietary. 
Any unauthorized use, reproduction or transfer of these materials is strictly prohibited);

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1765 views
  • 0 likes
  • 2 in conversation