Hi:
When you use ODS to create files, you are NOT creating true, binary Excel files. You are creating Markup Language files -- either HTML markup, comma separated markup or XML markup -- ASCII text files -- that Excel knows how to open and render. Refer to this previous posting for more discussion:
http://support.sas.com/forums/thread.jspa?messageID=8719∏
When you create an ODS HTML file, for example, you would normally give that file a file extension of .HTML. However, for convenience purposes, many people do this:
[pre]
ods html file='c:\temp\myfile.xls'; OR
ods csv file='c:\temp\myfile.csv'; OR
ods msoffice2k file='c:\temp\toXLS_mso.xls';
[/pre]
and give any of these files an .XLS extension it is merely for the convenience of "fooling" the Windows registry into opening Excel as the result of a double-click action (instead of launching the browser (as for an HTML or an XML file).
As for your question about creating multiple sheet workbooks, the only destination that easily creates multi-sheet workbooks is TAGSETS.EXCELXP. If you run the code shown below, you will see that only TAGSETS.EXCELXP output (in SAS 9) will create multiple sheets, one for each PROC REPORT step. For all the other destination output (HTML and CSV), the file that Excel displays will have both procedure outputs in one worksheet.
cynthia
[pre]
ods listing close;
ods csv file='comma_sep.csv';
ods html4 file='toXLS_HT4.xls' style=sasweb;
ods html3 file='toXLS_HT3.xls' style=sasweb;
ods msoffice2K file='toXLS_MSO.xls' style=sasweb;
ods tagsets.excelxp file='toXLS_XP.xls' style=sasweb
options(doc='Help');
proc report data=sashelp.class nowd;
title 'First Proc Report';
column Name Age Height Weight;
define Name /order;
define Age / display;
define height / display;
define weight / display;
run;
proc report data=sashelp.class nowd;
title 'Second Proc Report';
column Age Sex n height weight;
define Age / group;
define sex / group;
define n / 'Count';
define height / mean 'Avg Height';
define weight / mean 'Avg Weight';
rbreak after / summarize;
run;
ods _all_ close;
ods listing;
title; footnote;
[/pre]