BookmarkSubscribeRSS Feed
DLROW
Quartz | Level 8

Hi ,

 

From the posts, I understand that logo could not be added to Excel file from SAS. Is that true? How can I add  logo along with title on the output result. 

 

ODS LISTING CLOSE;

OPTIONS DEVICE=ACTXIMG;
ODS EXCEL FILE= "\\Path"
Options(SHEET_INTERVAL='NONE' SHEET_NAME='REPORT' SHEET_LABEL='' ORIENTATION='LANDSCAPE' FITTOPAGE='YES'
EMBEDDED_TITLES='YES' AUTOFILTER="1-4" FROZEN_HEADERS="5" ABSOLUTE_COLUMN_WIDTH='17,17,20,20'
ROW_HEIGHTS='0,0,0,20,0,0,0');
goptions iback='\\path\ logo.jpg' /**ADD LOGO***/
imagestyle=fit vsize=.62in hsize=3.86in ;
title1 H=2.7 justify=left bcolor=STB color=white "ABCDEF";
title2 H=2 justify=left bcolor=STB color=white "ABCD ";
title3 H=2 justify=left bcolor=STB color=white" EFGH " ;

PROC REPORT DATA=WORK.PREVENTION_PHYSICAL nowd
style(report)=[borderstyle=solid bordercolor=black BACKGROUND=TRANSPARENT verticalalign=T]
style(header)=[background=silver color=black fontfamily=calibri fontsize=3 textalign=L verticalalign=T borderstyle=solid bordercolor=black]
style(column)=[fontfamily=calibri fontsize=2.8 textalign=L verticalalign=T borderstyle=solid bordercolor=black tagattr="format:ddmmmyyyy"];
columns Date_OF_Birth Student_ID LAST_NAME FIRST_NAME;

define Date_OF_Birth / display "DOB" format=date9.;
define Student_ID / display "Student ID";
define LAST_NAME/ display "LAST NAME";
define FIRST_NAME / display "FIRST NAME";

RUN;
ODS EXCEL CLOSE;

 

Thanks.

2 REPLIES 2
Reeza
Super User

ODS EXCEL does support logos. 

 

This paper goes over how to add a logo: 

https://support.sas.com/resources/papers/proceedings16/SAS5642-2016.pdf

 

I think you need to use the macro included with the paper to include the logos though. 

 


@DLROW wrote:

Hi ,

 

From the posts, I understand that logo could not be added to Excel file from SAS. Is that true? How can I add  logo along with title on the output result. 

 

ODS LISTING CLOSE;

OPTIONS DEVICE=ACTXIMG;
ODS EXCEL FILE= "\\Path"
Options(SHEET_INTERVAL='NONE' SHEET_NAME='REPORT' SHEET_LABEL='' ORIENTATION='LANDSCAPE' FITTOPAGE='YES'
EMBEDDED_TITLES='YES' AUTOFILTER="1-4" FROZEN_HEADERS="5" ABSOLUTE_COLUMN_WIDTH='17,17,20,20'
ROW_HEIGHTS='0,0,0,20,0,0,0');
goptions iback='\\path\ logo.jpg' /**ADD LOGO***/
imagestyle=fit vsize=.62in hsize=3.86in ;
title1 H=2.7 justify=left bcolor=STB color=white "ABCDEF";
title2 H=2 justify=left bcolor=STB color=white "ABCD ";
title3 H=2 justify=left bcolor=STB color=white" EFGH " ;

PROC REPORT DATA=WORK.PREVENTION_PHYSICAL nowd
style(report)=[borderstyle=solid bordercolor=black BACKGROUND=TRANSPARENT verticalalign=T]
style(header)=[background=silver color=black fontfamily=calibri fontsize=3 textalign=L verticalalign=T borderstyle=solid bordercolor=black]
style(column)=[fontfamily=calibri fontsize=2.8 textalign=L verticalalign=T borderstyle=solid bordercolor=black tagattr="format:ddmmmyyyy"];
columns Date_OF_Birth Student_ID LAST_NAME FIRST_NAME;

define Date_OF_Birth / display "DOB" format=date9.;
define Student_ID / display "Student ID";
define LAST_NAME/ display "LAST NAME";
define FIRST_NAME / display "FIRST NAME";

RUN;
ODS EXCEL CLOSE;

 

Thanks.


 

 

 

 

DLROW
Quartz | Level 8

Got the answer. It works now... I didn't add

 

proc gslide;
run; quit;

 

after image style..

 

 

 

ODS LISTING CLOSE;

OPTIONS DEVICE=ACTXIMG;
ODS EXCEL FILE= "\\Path"
Options(SHEET_INTERVAL='NONE' SHEET_NAME='REPORT' SHEET_LABEL='' ORIENTATION='LANDSCAPE' FITTOPAGE='YES'
EMBEDDED_TITLES='YES' AUTOFILTER="1-4" FROZEN_HEADERS="5" ABSOLUTE_COLUMN_WIDTH='17,17,20,20'
ROW_HEIGHTS='0,0,0,20,0,0,0');
goptions iback='\\path\ logo.jpg' /**ADD LOGO***/
imagestyle=fit vsize=.62in hsize=3.86in ;

proc gslide; /*Missed this*/
run; quit; /*Missed this*/
title1 H=2.7 justify=left bcolor=STB color=white "ABCDEF";
title2 H=2 justify=left bcolor=STB color=white "ABCD ";
title3 H=2 justify=left bcolor=STB color=white" EFGH " ;

PROC REPORT DATA=WORK.PREVENTION_PHYSICAL nowd
style(report)=[borderstyle=solid bordercolor=black BACKGROUND=TRANSPARENT verticalalign=T]
style(header)=[background=silver color=black fontfamily=calibri fontsize=3 textalign=L verticalalign=T borderstyle=solid bordercolor=black]
style(column)=[fontfamily=calibri fontsize=2.8 textalign=L verticalalign=T borderstyle=solid bordercolor=black tagattr="format:ddmmmyyyy"];
columns Date_OF_Birth Student_ID LAST_NAME FIRST_NAME;

define Date_OF_Birth / display "DOB" format=date9.;
define Student_ID / display "Student ID";
define LAST_NAME/ display "LAST NAME";
define FIRST_NAME / display "FIRST NAME";

RUN;
ODS EXCEL CLOSE;

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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
  • 1956 views
  • 0 likes
  • 2 in conversation