I have the following code to open an existing file in excel, the put statement to make this work should look like this
put '[OPEN("c:\temp\c:\temp\rich.xls"]';
I changed it to
put "[OPEN("c:\temp\&client..xls"]"; to account for a filename that will be provided via a macro, I can't get this to work, any suggestions?
%let client = rich;
options noxsync noxwait xmin;
filename cmds dde 'excel|system';
data _null_;length fid rc start stop time 8;fid=fopen('cmds','s');if (fid le 0) then do;rc=system('start excel');
start=datetime();stop=start+10;do while (fid le 0);fid=fopen('cmds','s');time=datetime();if (time ge stop) then fid=1;
end;end;rc=fclose(fid);run;
data _null_; file cmds;
put "[OPEN("c:\temp\&client..xls"]";
put '[QUIT()]';run;
QueryMan
put '[OPEN("c:\temp\c:\temp\rich.xls"]';
I changed it to
put "[OPEN("c:\temp\&client..xls"]"; to account for a filename that will be provided via a macro, I can't get this to work, any suggestions?
%let client = rich;
options noxsync noxwait xmin;
filename cmds dde 'excel|system';
data _null_;length fid rc start stop time 8;fid=fopen('cmds','s');if (fid le 0) then do;rc=system('start excel');
start=datetime();stop=start+10;do while (fid le 0);fid=fopen('cmds','s');time=datetime();if (time ge stop) then fid=1;
end;end;rc=fclose(fid);run;
data _null_; file cmds;
put "[OPEN("c:\temp\&client..xls"]";
put '[QUIT()]';run;
QueryMan