I am trying to spice up the table format with PROC TEMPLATE.
proc template;
define style mystyle;
/* Body */
class body /
backgroundcolor = white
color = black ;
/* Tables */
class table /
frame = box
rules = all
borderwidth = 1px
borderstyle = solid
bordercolor = #5D5D5D
borderspacing = 0
bordercollapse = collapse
cellpadding = 5px;
class data, header, rowheader /
fontfamily = '"Lucida Grande", Arial, sans-serif'
fontsize = 11pt
backgroundcolor = #FFF
color = black;
class header, rowheader /
fontweight = medium
textalign = left
fontsize = 12pt
backgroundcolor = #1F1C7C
color = #FFF;
/* System Title and Footers */
class systemtitle, systemfooter /
fontfamily = '"Lucida Grande", Arial, sans-serif';
/* Page number and date (for printer) */
class pageno, bodydate /
fontfamily = '"Lucida Grande", Arial, sans-serif' ;
end;
run;
ods html style=mystyle file = 'C:\Users\Ujjawal\Downloads\temp.htm';
proc print data=sashelp.class noobs;
run;
ods _all_ close;
The above code works fine if i use ODS HTML. But i need to create multi-sheet excel file. So i am using ODS TAGSETS EXCELXP. It does not work with ODS TAGSETS EXCELXP.
ods tagsets.excelxp file='C:\Users\Ujjawal\Documents\multii.xls' style=mystyle
options(sheet_name='Summary' skip_space='1,0,0,0,1' EMBEDDED_TITLES='yes' sheet_interval='none' suppress_bylines='no');
proc print data=sashelp.class noobs;
run;
ods tagsets.excelxp close;
What i am doing using PROC TEMPLATE - Making background color of header BLUE (#1F1C7C) and background color of border LIGHT BLACK (#5D5D5D) .
What is the issue/error you are getting?
I would grab a template I know that works and change that to see if I could get it working.
I know proc report allows you to customize formatting for tagsets so you do have work around options.
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!
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.