程序如下:
%let dir=F:\硕士\毕业论文\data\普通股型;
%macro fetchfile(v_wz);
filename wjlj "%bquote(&v_wz.)";
data filename;
v_open=dopen('wjlj');
if v_open>0 then do;
v_num=dnum(v_open);
do i=1 to v_num;
v_tmp=cats("v_tmp",i);
v_tmp=tranwrd(v-tmp,"","");
v_mem=dread(v_open,i);
output filename;
end;
end;
keep v_mem v_tmp;
v_close=dclose(v_open);
run;
filename wjlj clear;
%mend fetchfile;
%fetchfile(&dir);
%macro readexcl(v_fname=,v_temp=);
PROC IMPORT OUT=v_temp
DATAFILE= "F:\硕士\毕业论文\data\普通股型..xlsx"
DBMS=EXCEL REPLACE;
RANGE="万得$";
GETNAMES=YES;
MIXED=NO;
SCANTEXT=YES;
USEDATE=YES;
SCANTIME=YES;
RUN;
%mend readexcl;
data _null_;
set filename;
call execute('%readexcl(v_fname='||v_mem||',v_temp='||v_tmp||')');
run;
proc datasets library=work nolist;
delete target;
run;
%macro hbdata(v_tmp=);
pro append base=target data=&v_tmp force;
run;
%mend hbdata;
data _null_;
set filename;
call execute('hbdata(v_tmp='||v_tmp||')');
run;
%macro deletmp(v_tmp=);
proc datasets library=work nolist;
delete &v_tmp;
run;
%mend deletmp;
data _null_;
set filename;
call execute('%deletmp(v_tmp='||v_tmp||')');
run;
log提示:ERROR: 无法打开文件“F:\硕士\毕业论文\data\普通股型..xlsx”。该文件不存在或已被另一用户打开。或者您需要相应权限才能查看其数据
本人SAS是9.4 64位的,excel是wps版本(我百度看到的说WPS不分32和64),我创建新的excel时,显示的是excel2003.
请问论坛大佬,我改怎么修改,谢谢~