BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19
If I want to indent the cell contents of a column is there an option?

It appears that tagset would need to add INDENT to the XML as below.

This is original XML
[pre]
2 REPLIES 2
Eric_SAS
SAS Employee
Indent is a style attribute. It can be defined in a style element or as a style over-ride. This example shows both ways, It just depends upon which classlev statement you use. With proc print, report or tabulate the style or over ride can be specified in many ways.

proc template;
define style mystyle;
parent=styles.default;
style myclasslev from data/
indent=10;
end;
run;

ods listing close;
ods pdf file="file.pdf" style=mystyle;
ods tagsets.excelxp file='temp.xls' style=mystyle;
title ;footnote;
proc tabulate data=sashelp.class; * missing;
class name age / order=data;
/*classlev name / s=myclasslev;*/
classlev name / s=data[indent=10];
table name=' ' all="Total",
age=' '*(N COLPctN='%') / box="Agegp" ;
run;

ods _all_ close;
data_null__
Jade | Level 19
Thanks so much, just what I needed to see. Here is example of what I was trying to do.

[pre]
proc template;
define style mystyle;
parent=styles.default;
style rightIndent from data /
indent=4
just=right;
end;
run;

ods tagsets.excelxp file='temp006.xml' style=mystyle;
proc report nowd data=sashelp.class;
define _numeric_ / display style(column)=rightIndent;
run;
ods _all_ close;
[/pre]

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1765 views
  • 0 likes
  • 2 in conversation