SAS 写入、读出excel到SAS

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;

posted @ 2017-09-21 16:54  Anni爱摩天轮  阅读(395)  评论(0编辑  收藏  举报