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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1498 views
  • 0 likes
  • 2 in conversation