I have similar code but if can list out sheet names in one list file in excel file itself, this code would be helpful:
First part of the code creat macro variable to contain sheet names. And the second part will import each sheet using that macro variable. Does this helpful ??
filename mydata DDE "Excel|C:\Documents and Settings\enugus\Desktop\[myexcel.xls]list!R2C1:R4C1" notab;
data a_null_;
infile mydata notab missover dsd dlm='09'x;
format dset $200.;
input dset$ ;
no+1;
call symput('dset'||compress(put(no,best.)),compress(dset));
call symput('no',compress(put(no,best.)));
run;
/* create each dataset*/
%macro shells(dset);
%do j=1 %to &no.;
proc import datafile="C:\Documents and Settings\enugus\Desktop\myexcel.xls" out=data&j
dbms=excel replace;
sheet="&&dset&j";
quit;
%end;
%mend shells;
%shells;
~ Sukanya E