|
Gene ,
If you are using V9 all you need to do is use the Excel libname engine.
Paul Choate wrote a good little paper over the excel libname engine that
walks you through doing what you want.
Toby Dunn
If anything simply cannot go wrong, it will anyway. Murphys Law #2.
The buddy system is essential to your survival; it gives the enemy somebody
else to shoot at.
Murphys Law #
Tell a man there are 300 billion stars in the universe and he'll believe
you. Tell him a bench has wet paint on it and he'll have to touch to be
sure. Murphys Law #9
From: Gene Hart <genehart@GMAIL.COM>
Reply-To: Gene Hart <genehart@GMAIL.COM>
To: SAS-L@LISTSERV.UGA.EDU
Subject: Using ODS tagsets.ExcelXP to write multiple sheets
Date: Tue, 26 Jun 2007 09:57:20 -0700
My usual use of ODS to produce Excel files is to use HTML and a .xls
extension. For example:
ods html path='\\myfiles\CTRHS\Crn\Her-2 diffusion\Data\Excel'
file='HER2_all.xls' style=minimal;
But now I want to write to specific worksheets in the Excel file.
Here is what I tried and it didn't work. The last one overwrote the
others and it created a tab for each value of the page variable. I
want to write an excel file with 4 sheets (All, By DxYear, By AJCC
Stage, By HER2 Value). I even tried this just having the close
statement at the end and got the same result. Can anyone help me
make the tagsets.ExcelXP work and produce 1 file with 4 sheets?
Thanks much,
gene
ods tagsets.ExcelXP path='\\myfiles\CTRHS\Crn\Her-2 diffusion\Data
\Excel' file='HER2.xls' style=statdoc options (sheet_name = 'All' );
proc tabulate
etc.
ods tagsets.ExcelXP close;
ods tagsets.ExcelXP path='\\myfiles\CTRHS\Crn\Her-2 diffusion\Data
\Excel' file='HER2.xls' style=statdoc options (sheet_name = 'By
DxYear' );
more sas code
ods tagsets.ExcelXP close;
ods tagsets.ExcelXP path='\\myfiles\CTRHS\Crn\Her-2 diffusion\Data
\Excel' file='HER2.xls' style=statdoc options (sheet_name = 'By AJCC
Stage' );
more sas code
ods tagsets.ExcelXP close;
ods tagsets.ExcelXP path='\\myfiles\CTRHS\Crn\Her-2 diffusion\Data
\Excel' file='HER2.xls' style=statdoc options (sheet_name = 'By HER2
Value' );
more sas code
ods tagsets.ExcelXP close;
_________________________________________________________________
Hotmail to go? Get your Hotmail, news, sports and much more!
http://mobile.msn.com
|