<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic DDE error while working on excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DDE-error-while-working-on-excel/m-p/230400#M41774</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am getting the following error while writing in excel through dde session:&lt;/P&gt;
&lt;P&gt;ERROR: DDE session not ready.&lt;/P&gt;
&lt;P&gt;FATAL: Unrecoverable I/O error detected in the execution phase of the DATA step program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aborted during the EXECUTION phase.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;code I am using:-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if fileexist(checklist_doc_path) &lt;BR /&gt; then do; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; rc=system('"' !! checklist_doc_path !! '" 2&amp;gt;nul' ); &lt;BR /&gt; &lt;BR /&gt; submit continue; &lt;BR /&gt; &lt;BR /&gt; filename cmds dde 'excel|[&amp;amp;docname]Checklist!r3c3:r7c3' notab; &lt;BR /&gt; data _null_; &lt;BR /&gt; &lt;BR /&gt; ** Try Opening the DDE System Channel to winword. *; &lt;BR /&gt; do until (fsysid &amp;gt; 0); &lt;BR /&gt; fsysid = FOPEN("cmds", 's'); &lt;BR /&gt; x=sleep(1); &lt;BR /&gt; end; &lt;BR /&gt; rc = fclose(fsysid); &lt;BR /&gt; run; &lt;BR /&gt; &lt;BR /&gt; filename cmds dde "excel|system"; &lt;BR /&gt; &lt;BR /&gt; data _null_; &lt;BR /&gt; file cmds; &lt;BR /&gt; Put '[workbook.activate("Checklist")]'; &lt;BR /&gt; put '[select("r7c3:r7c3")]'; &lt;BR /&gt; todaydate=put(Date(),date9.); &lt;BR /&gt; put "'" todaydate '0D'x; &lt;BR /&gt; put '[save]'; &lt;BR /&gt; run; &lt;BR /&gt; &lt;BR /&gt; endsubmit; &lt;BR /&gt;end; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, when i reassign my filename from&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filename cmds dde "excel|system";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filename cmds dde 'excel|[&amp;amp;docname]Checklist!r3c3:r7c3' notab; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I get wrong entries(part of coding) populating my excel sheet. Please help!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Oct 2015 07:27:39 GMT</pubDate>
    <dc:creator>Arjumand</dc:creator>
    <dc:date>2015-10-17T07:27:39Z</dc:date>
    <item>
      <title>DDE error while working on excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-error-while-working-on-excel/m-p/230400#M41774</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am getting the following error while writing in excel through dde session:&lt;/P&gt;
&lt;P&gt;ERROR: DDE session not ready.&lt;/P&gt;
&lt;P&gt;FATAL: Unrecoverable I/O error detected in the execution phase of the DATA step program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Aborted during the EXECUTION phase.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;code I am using:-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if fileexist(checklist_doc_path) &lt;BR /&gt; then do; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; rc=system('"' !! checklist_doc_path !! '" 2&amp;gt;nul' ); &lt;BR /&gt; &lt;BR /&gt; submit continue; &lt;BR /&gt; &lt;BR /&gt; filename cmds dde 'excel|[&amp;amp;docname]Checklist!r3c3:r7c3' notab; &lt;BR /&gt; data _null_; &lt;BR /&gt; &lt;BR /&gt; ** Try Opening the DDE System Channel to winword. *; &lt;BR /&gt; do until (fsysid &amp;gt; 0); &lt;BR /&gt; fsysid = FOPEN("cmds", 's'); &lt;BR /&gt; x=sleep(1); &lt;BR /&gt; end; &lt;BR /&gt; rc = fclose(fsysid); &lt;BR /&gt; run; &lt;BR /&gt; &lt;BR /&gt; filename cmds dde "excel|system"; &lt;BR /&gt; &lt;BR /&gt; data _null_; &lt;BR /&gt; file cmds; &lt;BR /&gt; Put '[workbook.activate("Checklist")]'; &lt;BR /&gt; put '[select("r7c3:r7c3")]'; &lt;BR /&gt; todaydate=put(Date(),date9.); &lt;BR /&gt; put "'" todaydate '0D'x; &lt;BR /&gt; put '[save]'; &lt;BR /&gt; run; &lt;BR /&gt; &lt;BR /&gt; endsubmit; &lt;BR /&gt;end; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, when i reassign my filename from&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filename cmds dde "excel|system";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filename cmds dde 'excel|[&amp;amp;docname]Checklist!r3c3:r7c3' notab; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I get wrong entries(part of coding) populating my excel sheet. Please help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Oct 2015 07:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-error-while-working-on-excel/m-p/230400#M41774</guid>
      <dc:creator>Arjumand</dc:creator>
      <dc:date>2015-10-17T07:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: DDE error while working on excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-error-while-working-on-excel/m-p/230426#M41783</link>
      <description>Does Excel actually open, you see your file&lt;BR /&gt;Open? General process is comment out portions and run until you figure out which line is the issue. Once you've isolated it, post back and we can help with further debugging. &lt;BR /&gt;&lt;BR /&gt;I notice your comments say winword, is this code you're adapting from somewhere else?&lt;BR /&gt;&lt;BR /&gt;This is running on a server, is it a Windows Server with Excel installed.</description>
      <pubDate>Sat, 17 Oct 2015 19:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-error-while-working-on-excel/m-p/230426#M41783</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-10-17T19:14:06Z</dc:date>
    </item>
  </channel>
</rss>

