ods tagsets.excelxp file='c:\sas\programs\excelxp\ex5.xls';

ods tagsets.excelxp options(sheet_name='' sheet_interval='bygroup' sheet_label='Data');

proc sort data=sashelp.class out=classbysex;
   by sex;
run;

proc print data=classbysex;
   by sex;
run;

ods tagsets.excelxp close;
