Hi:
Well, you'll have to generate the "All" table separately and then use BY group processing for the sheet naming,as shown below.
cynthia
Otherwise, you only choice is to macro-ize your program so that you can create 3 tables and use a macro variable for the sheet_name suboption.
proc sort data=sashelp.shoes out=twoshoes;
by region;
where region in ('Asia', 'Pacific');
run;
ods excel file='c:\temp\mult_sheet2.xlsx'
options(sheet_interval='table' sheet_name='All');
proc tabulate data=twoshoes;
class product;
var sales;
table product all,
sales*(min mean sum max)/ box = 'Asia and Pacific';
run;
options nobyline;
ods excel options(sheet_interval='table' sheet_name='#ByVal1' suppress_bylines='on');
proc tabulate data=twoshoes;
where region in ('Asia', 'Pacific');
by region;
class region product;
var sales;
table product all,
sales*(min mean sum max);
run;
ods excel close;
here's what the sheets look like:
... View more