BookmarkSubscribeRSS Feed
JackHamilton
Lapis Lazuli | Level 10
I'm using the ExcelXP tagset v1.86 with embedded_titles='yes'.

I don't want the title cell to be merged with the columns after it. The documentation implies that that won't happen if I have specified NOCENTER, but it does. Perhaps the tagattr MERGEACROSS='no' would do what I want, but how do I specify a tagattr for a title?

Also, is there a way to specify that this tagattr will be applied to all cells, regardless of what creates them?
3 REPLIES 3
Eric_SAS
SAS Employee
To put tagattr on a title you need use inline formatting.


ods escapechar = '~';

title = '~{style [tagattr="mergeacross;yes"] Some title text };

data test;
d1 = '1st data row'; output;
d1 = '2nd data row'; output;
run;

ods listing close;

options topmargin=.5in bottommargin=.5in rightmargin=.18in leftmargin=.18in;

ods tagsets.excelxp file="t152.xls" style=journal
options(default_column_width='5,10,29,12,12,12,12,12,12,12,12,12' width_fudge='0.5'
embedded_titles='yes' print_footer_margin='.2' sheet_interval='none' sheet_name='sheet1'
pages_fitheight='50' pages_fitwidth='1' fittopage='yes'
frozen_headers='4' row_repeat='1-4' orientation='portrait' debug_level='-5');

proc print data=sashelp.shoes(obs=10);
run;
To give a tagattr on a title you need to use inline formatting.

ods escapechar = '~';

title ~{style [tagattr="mergeAcross:yes"] some title text}


Here is an example of using merge across elsewhere.


title ;

proc report data=test nowd;
columns d1;
define d1 / '' style={tagattr="mergeAcross:yes"};
run;


ods tagsets.excelxp close;
ods listing;
JackHamilton
Lapis Lazuli | Level 10
The problem with inline formatting is that the text of the formatting will appear in LISTING output. Is that fixed in 9.2?
David_SAS
SAS Employee
Jack,

No, inline formatting shows up in Listing in SAS 9.2.

-- David Kelley, SAS

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
  • 3 replies
  • 1246 views
  • 0 likes
  • 3 in conversation