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

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2706 views
  • 0 likes
  • 3 in conversation