|
Rather than use ods html to create a .xls file, check out ods
tagsets.ExcelXP and the SHEET_INTERVAL='Bygroup' option. If you modify
your proc report to use age as a by variable rather than a group
variable, you might get the results you're hoping for.
I'm interested to hear how it goes.
On Sep 6, 1:51 pm, datan...@GMAIL.COM ("data _null_;") wrote:
> I want to create an "XL" spread sheet that has some fancy header info.
> Using PROC REPORT as below I can achieve the desired output. This
> example uses technique I learn here on SAS-L. Using HTML and giving
> filetype XLS to the output file.
>
> But, I would also like to have each level of AGE begin a different
> SHEET. So I have a TAB for every level of AGE.
>
> I could get a similar result with XL libname engine or PROC EXPORT but
> I want the fancy columns headers that PROC REPORT produces.
>
> Can it be done?
>
> title;
> ods listing close;
> ods noresults;
> ods html file="class.xls";
> proc report nowd data=sashelp.class;
> column ('Other spanning' age name ('vital statistics' Height weight));
> define age / group noprint;
> define name / order;
> define height / display;
> define weight / display;
> break before age / page;
> compute before _page_;
> line 'Some spanning text';
> line 'AGE=' age 5.;
> endcomp;
> run;
> quit;
> ods html close;
|