*Create First/Report Fake Title Page;
ods tagsets.ExcelXp options(sheet_name='Title Page' sheet_interval='none');
proc report data=sashelp.class nowd noheader; where name = 'Alfred';
column name age height weight;run;
*Create second tab;
ods tagsets.ExcelXp options(embedded_titles='yes' EMBED_TITLES_ONCE='yes'sheet_name='22.214.171.124 Business Unit HA'sheet_interval='none');
proc report data=sashelp.class nowd; title 'My Second Sheet';
where sex = 'F';run;
proc report data=sashelp.class nowd;
where sex = 'M';run;
*Create third and fourth tab;
ods tagsets.ExcelXp options(embedded_titles='yes' EMBED_TITLES_ONCE='yes' sheet_name='Consumer Business Unit HA' sheet_interval='page');
proc report data=sashelp.shoes nowd; title 'Slippers'; where product = 'Slipper' and region in ('Pacific', 'Western Europe');
define region / group; break after region /page;run;
ods _all_ close;
Is anyone able to advise where or how we can use the Embed_titles_once option?
If you change sheet_interval='none' to sheet_interval='table', then the embed_titles_once works as advertised. My guess is there's some interaction between embed_titles_once and sheet_interval='none' -- what happens is that ODS builds all of the first table and then builds all of the second table and then puts the 2 tables together in 1 bigger table. Part of that building the tables before putting them together must include the title. You'd have to work with Tech Support for a definitive explanation.
For the 2 PROC REPORT scenario, you can get rid of the title on the second output, by simply issuing a NULL TITLE statement as shown in the (simplified) code below.