The SAS Output Delivery System and reporting techniques

Outputting to multiple excel workbooks

Reply
N/A
Posts: 0

Outputting to multiple excel workbooks

Is there a way of creating an excel workbook for each change in the value of the by variable in proc report?

Any help would be much appreciated.

Thanks
SAS Super FREQ
Posts: 8,739

Re: Outputting to multiple excel workbooks

Hi:
You could investigate the NEWFILE= option, which works with most Markup destinations.

With this code, I get 1 file for each by group: msrep1.xls thru msrep10.xls for the MSOFFICE2K HTML files and xprep1.xls thru xprep10.xls for the TAGSETS.EXCELXP XML files (using SASHELP.SHOES).

cynthia

[pre]
ods msoffice2k file='c:\temp\msrep1.xls' style=sasweb newfile=bygroup;
ods tagsets.excelxp file='c:\temp\xprep1.xls' style=sasweb newfile=bygroup;

proc report data=sashelp.shoes nowd;
title 'Report for #byval(region)';
by region;
column region product sales;
define region /group;
define product /group;
define sales /sum;
rbreak after / summarize;
run;

ods _all_ close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 92 views
  • 0 likes
  • 2 in conversation