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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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