The SAS Output Delivery System and reporting techniques

How do I attach a TAGATTR to a TITLE?

Reply
Frequent Contributor
Posts: 102

How do I attach a TAGATTR to a TITLE?

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?
SAS Employee
Posts: 95

Re: How do I attach a TAGATTR to a TITLE?

Posted in reply to JackHamilton
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;
Frequent Contributor
Posts: 102

Re: How do I attach a TAGATTR to a TITLE?

The problem with inline formatting is that the text of the formatting will appear in LISTING output. Is that fixed in 9.2?
SAS Employee
Posts: 174

Re: How do I attach a TAGATTR to a TITLE?

Posted in reply to JackHamilton
Jack,

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

-- David Kelley, SAS
Ask a Question
Discussion stats
  • 3 replies
  • 459 views
  • 0 likes
  • 3 in conversation