I've been following documentation online and browsing other stack overflow queries but I have not yet been able to find a way to output my SAS dataset to excel via DDE.
The version of SAS I am running is SAS9.4 The version of excel I am running is microsoft office 2016 - excel 2016
The code I use to export is
/*Excel DDE interface options*/ /*TEST*/
options noxwait noxsync;
X '"C:\Users\user.name\Desktop\template_dde.xlsx"';
data _null_;
rc=sleep(15);
run;
filename ddedata dde 'excel|SFA!r2c1:r4000c56';
data _null_;
file ddedata notab;
set work.Results_output_format end=eof;
put '"THIS IS A TEST"';
run;
%LET timestamp = %SYSFUNC(PUTN(%SYSFUNC(DATE()),yymmddn8.));
%LET hourstamp = %SYSFUNC(COMPRESS(%SYSFUNC(TIME(),time.),%STR( :)));
data _null_;
length cmnd $150.;
file ddedata;
cmnd = '"[save.as("C:\Users\user.name\Desktop\×tamp._&hourstamp._template_dde.xlsx")]"';
put cmnd;
put '[quit()]';
run;
It outputs the "this is a test" and then outputs the save statement but my data is not exported and the file is not actually saved.
Am I overlooking anything?