<?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: DDE for Excel PasteSpecial to paste values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848862#M335604</link>
    <description>&lt;P&gt;DDE is deprecated by Microsoft. The ports have been taken over by other software, causing DDE to not work at all. Even if you could make it work now, you only take out a loan at the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use ODS to build the Excel completely with all styles, or prepare a VBA script which you can run as an external command.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Dec 2022 07:11:45 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-12-10T07:11:45Z</dc:date>
    <item>
      <title>DDE for Excel PasteSpecial to paste values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848861#M335603</link>
      <description>&lt;P&gt;I have a SAS program that prepares data and then pours data into an Excel file.&amp;nbsp; This is followed by a macro that goes in and "pretties it up" such as changing fonts, column widths etc.&amp;nbsp; I want to add a new function, tell Excel to copy one column an paste it back to the same place, but as values - which is Paste Special rather than the regular paste.&amp;nbsp; In Excel macro language, the language is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Columns("L:L").Select&lt;BR /&gt;Selection.Copy&lt;BR /&gt;Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _&lt;BR /&gt;:=False, Transpose:=False&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I try to make that run in a SAS DDE session, along with the other prettying up, it does not work.&amp;nbsp; I've done some trial and error, but I just don't know enough about translating Excel-speak to DDE-speak.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you tell Excel to special paste or is this a lost cause?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if tab EQ 'Unit Value Series' then do;
put '[select("c12")]';
  put '[copy()]';
  put '[SELECT("c12")]';
  put '[xlPasteValues()]';
  end ;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 06:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848861#M335603</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2022-12-10T06:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: DDE for Excel PasteSpecial to paste values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848862#M335604</link>
      <description>&lt;P&gt;DDE is deprecated by Microsoft. The ports have been taken over by other software, causing DDE to not work at all. Even if you could make it work now, you only take out a loan at the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use ODS to build the Excel completely with all styles, or prepare a VBA script which you can run as an external command.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 07:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848862#M335604</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-12-10T07:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: DDE for Excel PasteSpecial to paste values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848863#M335605</link>
      <description>&lt;P&gt;Kurt:&amp;nbsp; thanks, but I am working on an isolated system with Office 2016.&amp;nbsp; Works great and no need to change at this time.&amp;nbsp; I'd appreciate help with the issue rather than a suggestion to abandon hundreds of lines of code and start from scratch.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 07:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848863#M335605</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2022-12-10T07:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: DDE for Excel PasteSpecial to paste values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848866#M335608</link>
      <description>&lt;P&gt;Kurt:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created a VBA script in Excel and then added a put line to call that script in the long cue of formatting in the "prettyup" macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; put '[workbook.activate("Unit Value Series")]';
  put '[run("macro4")]';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 09:26:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-for-Excel-PasteSpecial-to-paste-values/m-p/848866#M335608</guid>
      <dc:creator>texasmfp</dc:creator>
      <dc:date>2022-12-10T09:26:26Z</dc:date>
    </item>
  </channel>
</rss>

