SAS中文论坛

标题: a simple DDE error [打印本页]

作者: shiyiming    时间: 2008-10-28 22:45
标题: a simple DDE error
error
"ERROR: Physical file does not exist, EXCEL|SYSTEM."

my program is
options noxwait noxsync;
X "'C:\Program Files\Microsoft Office\Office\EXCEL.exe'";
DATA _NULL_;
X = SLEEP(3);
RUN;
FILENAME commands DDE 'EXCEL|SYSTEM';

%macro report(path=,outname=);

data _null_;
file commands;
PUT '[OPEN("C:\project\AMX103\05.Modeling\05.03.Other\20081028_dde\temp.xls")]';
run;

FILENAME report DDE "Excel|[temp.xls]sheet1!R7C1:R150C15" NOTAB LRECL=100000;

data random;
   do i=1 to 100;
      x=ranuni(i);
      y=10+x;
      z=x-10;
      put x y z;
   end;
run;

DATA report;
set random;
file report;
put x y z;
run;



data _null_;
file commands;
put "[Save.as(""&Path.\&outname..xls"")]";
put "[Close]";
run;

%mend report;

%report(path=C:\project\AMX103\05.Modeling\05.03.Other\20081028_dde,outname=temp2);

Thanks
作者: shiyiming    时间: 2008-10-29 02:16
标题: Re: a simple DDE error
you may check the location of your excel.exe, it's "C:\Program Files\Microsoft Office\Office11\EXCEL.exe" for Office 2003.




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2