| Date: | Thu, 6 Sep 2007 14:26:39 -0500 |
| Reply-To: | "data _null_;" <datanull@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "data _null_;" <datanull@GMAIL.COM> |
| Subject: | Re: ODS HTML to XL using proc report. |
|
| In-Reply-To: | <1189105022.705070.66350@22g2000hsm.googlegroups.com> |
| Content-Type: | text/plain; charset=ISO-8859-1 |
That is precisely what I need. The example below, while very crude,
illustrates what I am trying to achieve.
A quick seach on TAGSETS.EXCELXP found this interesting paper:
http://www2.sas.com/proceedings/sugi31/115-31.pdf
Thank you so much.
title1;
ods listing close;
ods noresults;
ods tagsets.ExcelXP file='class.xls' options(SHEET_INTERVAL='Bygroup');
proc sort data=sashelp.class out=work.class;
by age;
run;
proc report nowd data=work.class;
by age;
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 _all_ close;
ods listing;
On 9/6/07, Perry <jasper6294@gmail.com> wrote:
> 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;
>
|