The SAS Output Delivery System and reporting techniques

excelXP embed_titles_once for tabulate tables

Reply
Valued Guide
Posts: 2,177

excelXP embed_titles_once for tabulate tables

For proc tabulate, I had hoped to avoid embedding title more than once, with the option embed_titles_once='yes', when sheet_interval='proc' and more than one table.
On v1.94, 09/09/12 of the tagsets, it repeated the title for each table.
Here is my demo code[pre]ods tagsets.excelxp file='demo.xml'
options( sheet_name='demo'
SHEET_INTERVAL='proc'
Embedded_Titles='yes'
Embed_Titles_Once='yes' )
;
title "test excelXP Embed_Titles_Once='yes' "
;
proc tabulate data= sashelp.class ;
class age ;
var height weight ;
table age all, (height weight)*mean=' ' / box= 'means' ;
table age all, (height weight)*max= ' ' / box= 'max s' ;
run
;
ods tagsets.excelxp close
;[/pre]
The title appears twice.

What options can I add to reduce this to just one title in the worksheet.

PeterC
SAS Employee
Posts: 95

Re: excelXP embed_titles_once for tabulate tables

This is interesting. Apparently embed titles only once only applies to bygroups...

Removing the outer

do/if cmp($sheet_interval, "bygroup");

Will fix the problem.

Here is a snippet of the offending code.

define event embedded_title;
break /if ^$embedded_titles;
break /if ^$titles;

do /if cmp($sheet_interval, "bygroup");
do /if $one_embedded_title_set;
unset $titles /breakif $worksheet_has_titles;
set $worksheet_has_titles "True";
done;
done;
Valued Guide
Posts: 2,177

Re: excelXP embed_titles_once for tabulate tables

many thanks, Eric

that is tested just fine on my "home" sas9.2
I'll try the client office tomorrow
Ask a Question
Discussion stats
  • 2 replies
  • 268 views
  • 0 likes
  • 2 in conversation