BookmarkSubscribeRSS Feed
Peter_C
Rhodochrosite | Level 12
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
2 REPLIES 2
Eric_SAS
SAS Employee
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;
Peter_C
Rhodochrosite | Level 12
many thanks, Eric

that is tested just fine on my "home" sas9.2
I'll try the client office tomorrow

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1472 views
  • 0 likes
  • 2 in conversation