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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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