Hi: Andre mentioned the possibility of using TAGSETS.EXCELXP. The advantages of this method are: 1) ODS creates output that conforms to the Office 2003 Spreadsheet Markup Language XML specification for multi-sheet workbooks 2) That means ODS can automatically create multi-sheet workbooks without making an HTML file first 3) TAGSETS.EXCELXP has an extensive set of suboptions that allow you to control printing, orientation, gridlines, etc (look in the log to see Doc='Help' documentation 4) You are creating an ASCII text file that is not an HTML file The disadvantages of this method are: 1) By Microsoft design specs, you cannot use images, logos or graphs in the XML file 2) If your users want to see the file named as .XLS instead of .XML, you may have to open and resave the file from inside Excel 3) If you name the file with the .XLS extension in your SAS code, you are not creating a "true binary" Excel file, you are merely "fooling" the Windows registry into launching Excel when the file icon is clicked on. Sample code is below. If you run it, you should see 3 worksheets in the workbook. Here's a user group paper that discusses some of the more popular suboptions. http://www.nesug.org/proceedings/nesug08/ap/ap06.pdf cynthia title; footnote; ods _all_ close; ** Open by doing a File-->Open from inside Excel; ods tagsets.excelxp file='c:\temp\multsheet_wb.xml' style=sasweb options(doc='Help'); proc print data=sashelp.class(obs=5); run; proc print data=sashelp.shoes(obs=5); run; proc print data=sashelp.cars(obs=5); run; ods _all_ close;
... View more