BookmarkSubscribeRSS Feed
deleted_user
Not applicable
The Doc that comes with excelXP doc='help' indicates the impressive scope provided by this tagset. However, I seem unable to persuade the class level values to appear anywhere than on the last row of the class level. What am I missing? Here is some code to demonstrate what I seek: [PRE]
ods _all_ close ;
ods tagsets.excelxp file="demo.rts.alignment.xls" ;
ods html file="demo.rts.alignment.html" ; * for comparison;
proc tabulate data= sashelp.class format= 3. ;
class sex name ;
classlev sex name /STYLE=[just=center vjust=middle] ; *effective on html ;
table sex*name, n ;
run;
ods _all_ close;
[/pre]

Peter
2 REPLIES 2
Eric_SAS
SAS Employee
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;
deleted_user
Not applicable
many thanks

That is the logical solution. It works perfectly.
I'm still learning the direction I should look to adjust appearance.

Peter

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 624 views
  • 0 likes
  • 2 in conversation