I supposed have to generate the Report for 15 countries in one workbook. Each country should be in one work-sheet.
write no m using
If you have SAS 9 and Excel 2003 or higher, you can build XML files using ODS TAGSETS.EXCELXP ; this will give you the opportunity to use options like SHEET_INTERVAL=BYGROUP, and adding a BY country ; statement in your report program will automatically create a different worksheet for each country, no matter how many they are.
Details & documentation can be found on : http://support.sas.com/rnd/base/topics/odsmarkup/ http://support.sas.com/rnd/papers/sugi29/ExcelXML.pdf
and the syntax can be displayed in your log running code like :
ODS TAGSETS.EXCELXP OPTIONS(DOC="HELP") FILE = "c:\temp\nothing.xls" ;
ODS TAGSETS.EXCELXP CLOSE ;