Hi,
I am getting the following error while writing in excel through dde session:
ERROR: DDE session not ready.
FATAL: Unrecoverable I/O error detected in the execution phase of the DATA step program.
Aborted during the EXECUTION phase.
code I am using:-
if fileexist(checklist_doc_path)
then do;
rc=system('"' !! checklist_doc_path !! '" 2>nul' );
submit continue;
filename cmds dde 'excel|[&docname]Checklist!r3c3:r7c3' notab;
data _null_;
** Try Opening the DDE System Channel to winword. *;
do until (fsysid > 0);
fsysid = FOPEN("cmds", 's');
x=sleep(1);
end;
rc = fclose(fsysid);
run;
filename cmds dde "excel|system";
data _null_;
file cmds;
Put '[workbook.activate("Checklist")]';
put '[select("r7c3:r7c3")]';
todaydate=put(Date(),date9.);
put "'" todaydate '0D'x;
put '[save]';
run;
endsubmit;
end;
Also, when i reassign my filename from
filename cmds dde "excel|system";
to
filename cmds dde 'excel|[&docname]Checklist!r3c3:r7c3' notab;
I get wrong entries(part of coding) populating my excel sheet. Please help!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.