Hi,
Given that frame= and rules= don't seem to be taken into account in the ods excel destination, I was wondering whether there would be a smarter ways of of adding the borders than this one:
data class;
set sashelp.class end=_eof;
eof=_eof;
run;
ods excel file="&xxtest./reporting/test.xlsx"
options(start_at='2,2');
proc report data=class
style(column header)=[borderstyle = hidden
borderstyle = hidden]
style(header)=[bordertopstyle = solid
bordertopcolor = red
borderbottomstyle = solid
borderbottomcolor = blue];
column eof name--height;
define eof / display noprint;
compute eof;
if eof=1 then call define(_row_,'style','style=[borderbottomstyle=solid
borderbottomcolor=red]');
endcomp;
run;
ods excel close;
ods excel file="c:\temp\test.xlsx"
options(start_at='2,2');
proc report data=sashelp.class nowd
style(column)={
borderleftcolor=white borderleftwidth=2
borderrightcolor=white borderrightwidth=2
bordertopcolor=white bordertopwidth=2
borderbottomcolor=white borderbottomwidth=2 }
style(header)={
borderleftcolor=cxEDF2F9 borderleftwidth=2
borderrightcolor=cxEDF2F9 borderrightwidth=2
bordertopcolor=black bordertopwidth=2
borderbottomcolor=black borderbottomwidth=2 }
;
compute weight;
if name='William' then call define(_row_,'style','style={
borderbottomcolor=black borderbottomwidth=2
}');
endcomp;
run;
ods excel close;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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 lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.