<% @language="vbscript" %>
Site hosted by Angelfire.com: Build your free website today!
   欢迎光临
 

Notes:

  
If you have a multisheets excel data you want to import them to SAS at the same time you can use this program. Sometimes the Excel datasheet names are not very regular, I suggest you change worksheets' name

  %macro readfl(j);

%do i=1 %to &j;

proc import out= work.yourdata&i

datafile= "c:\yourdata.xls" /*your excel data*/

dbms=excel2000 replace;

range="sheet&i$";

getnames=yes;

%if &i>1 %then %do;

proc append base=yourdata1 DATA=yourdata&i force;/*append to yourdata1 database*/

%end

%end;

%mend readfl;

%readfl(10);/*If there are 10 worksheets in the Excel file */

run;

 

 

MOST PROGRAMS WERE WRITTEN BY MYSELF, IF NOT, SOURCE WILL BE CITED.
All RIGHT RESERVED.
FREE WEB HOST PROVIDED BY BRINKSTER.COM