There is no way for the tagset to know that you are giving an over ride for the justification. In excel, justification is part of the style definition. So this causes special problems that could lead to enormous style definitions.
The tagset could be coded to handle this, but it's already slow and I'm
hesitant to add more processing for this case when there is a good
work around.
Currently, to change the justification you need to create a style element with the justification you desire.
This will do what you want.
proc template;
define style styles.mystyle;
parent=styles.default;
style classlev from header/
vjust=middle
just=center
;
end;
run;
ods _all_ close ;
ods tagsets.excelxp file="demo.rts.alignment.xls" style=mystyle;
ods html file="demo.rts.alignment.html" style=mystyle; * for comparison;
proc tabulate data= sashelp.class format= 3. ;
class sex name ;
classlev sex name /STYLE=classlev ; *effective on html ;
table sex*name, n ;
run;
ods _all_ close;