%macro excel_export(libname,outfile,method,filename,type);
%let libname=%upcase(&libname);
proc sql noprint;
select memname,count(memname) into:memlist separated by "\" ,
:nummem
from dictionary.tables where libname="&libname";
quit;
%do i=1 %to &nummem;
%let memname&i=%scan(&memlist,&i,\);
%if &method=onefile %then %do;
proc export data=&libname..&&memname&i
outfile="&outfile\&filename..&type"
dbms=excel;
run;
%end;
%if &method=lmuitifile %then %do;
proc export data=&libname..&&memname&i
outfile="&outfile\&&memname&i...&type"
dbms=excel;
run;
%end;
%end;
%mend excel_export;
%excel_export(D:\study\dataset\03dataset,D:\study\dataset,onefile,Data,xls);
求問為什么運(yùn)行之后沒有反應(yīng)?