| 
 | 
楼主
 
 
 楼主 |
发表于 2004-5-19 08:44:52
|
只看该作者
 
 
 
Two ways to export SAS tables to Excel
First technique: create a comma delimited file that can be read in by Excel 
filename forxport 'c:\temp\tabulate.lis'; 
proc printto print=forxport new; run; 
 
options ls=250 ps=250; 
proc tabulate data=temp noseps formchar=",          "; 
   /* your tabulate code goes here */ 
run; 
 
proc printto; run; 
 
Second technique: create HTML output that can be read in by Excel 
Version 6 technique: download free HTML formatting tools from <!-- w --><a class="postlink" href="http://www.sas.com">http://www.sas.com</a><!-- w --> and install. Then output your TABULATE code to HTML:  
 
%tab2htm (capture=on, runmode=b); 
options formchar='82838485868788898A8B8C'X; 
   /* your tabulate code goes here */ 
%tab2htm (capture=off, runmode=b, openmode=replace, 
  htmlfile='c:\temp\test1.html'); 
 
Version 8 technique:  
 
ODS HTML body='c:\temp\test2.html'; 
   /* your tabulate code goes here */ 
ODS HTML close; |   
 
 
 
 |