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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.