Hi:
I almost didn't see this. In the future, it might be better to start a new post and then just put a link to the post you want to "build on".
If you are going to use a custom style to get rid of the interior table lines for output from TAGSETS.EXCELXP, then you may as well add a new style element to the template -- in this template, I call my custom element SUMHEADER -- I know that there is no SAS procedure that will ever ask for SUMHEADER, so once the custom style element is in the template, I just need to refer to that style element in the PROC REPORT code. While most usages of PROC REPORT the curly braces and the style attribute overrides, PROC REPORT also supports a reference to a style element (in which case, no curly braces are needed.)
The example below builds on the examples above and uses JOURNAL as the parent and then customizes the TABLE and HEADER elements, but adds the SUMHEADER element.
cynthia
[pre]
ods path work.tmp(update) sashelp.tmplmst(read);
** 4) Now use styles.journal as a parent template;
** and create a custom element called SUMHEADER;
** that will be used for summary lines in PROC REPORT;
proc template;
define style styles.journal_sum;
parent=styles.journal;
class table /
borderwidth=0
rules=none
frame=void
cellspacing=0
background=white;
class header /
fontweight=bold
fontsize=10pt
font_face='Arial'
borderbottomwidth=2
borderbottomstyle=solid
borderbottomcolor=black
;
class sumheader from header/
fontweight=bold
textalign=r
fontsize=10pt
font_face='Arial'
borderbottomwidth=2
borderbottomstyle=solid
borderbottomcolor=red
bordertopwidth=2
bordertopstyle=solid
bordertopcolor=black
;
end;
run;
ods listing close;
ods tagsets.excelxp file='c:\temp\summ_bord.xls' style=styles.journal_sum;
** In PROC REPORT, the AGE variable is not styled by the ROWHEADER element;
** so a few style overrides are needed.;
proc report data=sashelp.class nowd;
title 'title REPORT';
column age n,sex age=all;
define age / group
style(column)={fontweight=bold just=c};
define sex / across;
define n / ' ';
define all / n 'Total';
rbreak after / summarize style=sumheader;
run;
ods _all_ close;
[/pre]
... View more