/*创建输出excel的宏*/
%macro export(inlib,intbl,outpath,outfile);
  proc export data=&inlib..&intbl  
    outfile= "&outpath\&outfile..xls"     
    dbms=xls label replace;
    putnames=yes;
  run;
%mend;

%let outpath=F:\excel_files; /*输出excel路径*/ 
%let inpath=F:\sas7bdata_files;/*sas数据所在路径*/
libname source "&inpath";/*创建逻辑库source*/
data _null_;
  set sashelp.vstable (where=(libname='SOURCE'));
  call execute(cats('%nrstr(%export)('
                   ,catx(',',libname,memname,'&outpath',memname)
                   ,')'));
run;

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2021-11-12
  • 2022-12-23
  • 2021-04-20
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-06-04
  • 2021-12-03
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案