<?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 Re: USING DDE Excel with Macro Variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118282#M24407</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you have set up the macro variable with the required value, I suspect it is not resolving because of the single quotes that surround the &lt;SPAN style="font-family: 'courier new', courier;"&gt;put&lt;/SPAN&gt; string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;put '[select("R' "&amp;amp;part" 'C23")]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Sep 2012 17:52:42 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2012-09-11T17:52:42Z</dc:date>
    <item>
      <title>USING DDE Excel with Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118281#M24406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;Please see if someone can help:-&lt;/P&gt;&lt;P&gt;When i am running following program it is running fine:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;filename example1 dde 'excel|System'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set load_time2; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file example1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((final_delay)='No Delays') then do; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put '[select("R11C23")]'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put '[patterns(1,,6,true)]'; /* color it red */ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when i am trying&amp;nbsp; to use macro variable for Row&amp;nbsp; It is giveing me SAS DDE Error.&lt;/P&gt;&lt;P&gt;filename example1 dde 'excel|System'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set load_time2; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file example1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ((final_delay)='No Delays') then do; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put '[select("R&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&amp;amp;part.&lt;/STRONG&gt;&lt;/SPAN&gt;C23")]'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;put '[patterns(1,,6,true)]'; /* color it red */ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please assist&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 11:14:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118281#M24406</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-09-11T11:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: USING DDE Excel with Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118282#M24407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you have set up the macro variable with the required value, I suspect it is not resolving because of the single quotes that surround the &lt;SPAN style="font-family: 'courier new', courier;"&gt;put&lt;/SPAN&gt; string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;put '[select("R' "&amp;amp;part" 'C23")]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2012 17:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118282#M24407</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2012-09-11T17:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: USING DDE Excel with Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118283#M24408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Macro is resolving same as we required. However i suspect there might be some conflict netween DDE and MAcro engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody can help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 04:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118283#M24408</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-09-12T04:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: USING DDE Excel with Macro Variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118284#M24409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;manojinpec: You never posted the code showing how you are creating the macro variable &amp;amp;part.&amp;nbsp; Your original code wouldn't have resolved correctly, anyhow, but Amir's solution did work if the macro variable had been created correctly.&amp;nbsp; Did you test it using the mlogic symbolgen and mprint options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took dde out of the equation and ran the following to see if you were creating what you expected to create.&amp;nbsp; You might want to try to do the same with your current code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data load_time2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat final_delay $20.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input final_delay &amp;amp;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;Some Delays&lt;/P&gt;&lt;P&gt;No Delay&lt;/P&gt;&lt;P&gt;No Delays&lt;/P&gt;&lt;P&gt;Lots of Delays&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let part=11;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set load_time2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file "c:\testdde.txt";;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ((final_delay)='No Delays') then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put '[select("R' "&amp;amp;part" 'C23")]';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; put '[patterns(1,,6,true)]'; /* color it red */&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 12:46:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/USING-DDE-Excel-with-Macro-Variable/m-p/118284#M24409</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-09-12T12:46:40Z</dc:date>
    </item>
  </channel>
</rss>

