options validvarname=any;/*因为excel中的名字存在空格等*/
/*写入excel,class,air,bei分别是test.xlsx中的表名*/
libname s xlsx './test.xlsx';
data s.class;
set sashelp.class;
run;
data s.air;
set sashelp.air;
run;
data s.bei;
set sashelp.bei;
run;
libname s clear;
/*从excel读出到SAS数据集*/
libname s xlsx './test.xlsx';
data a;
set s.class;
run;
proc print data=a;
run;
libname s clear;