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.
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.
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.