We have some sas code that we %include into most of our stored processes so that users can select their preferred style of output. It is: data _null_; if upcase("&outtype") = "HTML" then call symput("odsdest","HTML"); if upcase("&outtype") = "PDF" then do; options orientation=landscape; rc = stpsrv_header('Content-type','application/pdf'); rc = stpsrv_header('Content-disposition','attachment; filename=temp.pdf'); call symput("odsdest","PDF"); end; if upcase("&outtype") = "EXCEL" then do; rc = stpsrv_header('Content-type','application/vnd.ms-excel;'); rc = stpsrv_header('Content-disposition','attachment; filename=temp.xls'); call symput("odsdest","tagsets.excelxp"); end; run; %let _odsdest=&odsdest; %global _ODSSTYLE; %let _ODSSTYLE=Normal; run; The HTML and PDF output is fine, as the PROC REPORT is output with the headers and footers. But the excel version of the output is lacking the headers and footers. There are two parts to the report with each part being written to a separate worksheet in the file. Why are the headers/footers not being displaced in Excel? I tried a different set of code that does not have call symput("odsdest","tagsets.excelxp"); That output puts the headers/footers, but it all appears on a single worksheet. Suggestions?
... View more