H****g 发帖数: 2273 | 1 一个SAS library下面有多个data file。
要求把它们都转成Excel, Excel文件名是Libname,每个sheet对应一个data file,
sheet的名字是data file的名字,程序要怎么写啊~
难者不会,会者不难,求各位熟手指点!拜谢!! |
l****u 发帖数: 529 | 2 google "ods tagsets"
难者不会,会者不难. 更要学会怎样有效,主动的学习 |
H****g 发帖数: 2273 | 3 好的,谢谢,我试试看
【在 l****u 的大作中提到】 : google "ods tagsets" : 难者不会,会者不难. 更要学会怎样有效,主动的学习
|
K***a 发帖数: 72 | 4 Try this:
proc sql noprint;
select count(*), memname into :tb1-:tb100, :numDs
from sashelp.vtable where libname="Urlibname";
quit;
filename outfname ".../Libname.xlsx";
%macro expdt;
%do i = 1 %to &numDs;
proc export data=&&tb&i
outfile=outfname dbms=xlsx replace;
sheet=&&tb&i;
run;
%end;
%mend;
%expdt; |
K***a 发帖数: 72 | 5 Correction:
proc sql noprint;
select memname, count(*) into :tb1-:tb100, :numDs
from sashelp.vtable where libname="Urlibname";
quit; |