<?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: Multiple Worksheets in Excel Using DDE in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84142#M1117</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I guess I don't understand why you would want to copy a table from Word to Excel using ODS. Word and Excel are both proprietary Microsoft products. Word makes documents. Excel has workbooks composed of worksheets. SAS and ODS can -CREATE- output files for Word (using ODS RTF) and for Excel (using ODS CSV, ODS HTML or ODS TAGSETS.EXCELXP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But for Word to Excel communication or transfer of document content from Word to Excel, I would not expect SAS to be able to help you much in this regard. I'm not sure where you got the idea that SAS could "copy some part of text from word doc to excel", but that is not something that would happen unless you could 1) read the Word doc with SAS and take the table from Word into a SAS dataset and then 2) once you have a SAS dataset write the dataset table to a format taht Excel can open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; However, #1 is very problematic. Word documents are in a proprietary document format -- Word's primary purpose is to have paragraphs of text --it may have tables, but you could have a whole document without a single table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; See the code below. It is creating an RTF file based on SASHELP.SHOES and a file for Excel using the same SAS dataset. I know that this is not exactly what you said you wanted to do -- but cutting from Word and pasting into Excel does sound like something you would do with DDE or a VB Script or VBA -- Microsoft technology and not SAS technology.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\two_regions.rtf' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp file='c:\temp\two_regions.xml' style=sasweb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp options(sheet_name='Asia');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.shoes nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;where region = 'Asia';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column region product sales inventory returns;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define region / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define product / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;rbreak after/ summarize;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp options(sheet_name='Canada');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.shoes nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;where region = 'Canada';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column region product sales inventory returns;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define region / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define product / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;rbreak after/ summarize;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Apr 2012 18:52:07 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2012-04-18T18:52:07Z</dc:date>
    <item>
      <title>Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84137#M1112</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;Am trying to create a multitab excel sheet using DDE, I was able to create multiple excel sheets but was not able to create a single excel with multiple tabs. Is there any way to do this using DDE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 05:51:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84137#M1112</guid>
      <dc:creator>sasjourney</dc:creator>
      <dc:date>2012-04-15T05:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84138#M1113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do a google search for: multiple worksheets sas dde&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will find numerous examples.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 14:27:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84138#M1113</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-04-15T14:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84139#M1114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sheet name is part of the file reference in DDE so take a look at your file name statements -- sorry don't have the exact syntax in front of me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, for better or worse, DDE is a dying methodology.&amp;nbsp; And it will be dead once Microsoft pulls the plug.&amp;nbsp; So don't spend a lot of time using DDE within long term production jobs.&amp;nbsp; Take a look at ODS or PC File server.&amp;nbsp; ODS does multi-sheet workbooks.&amp;nbsp; Hate to see DDE go, but its in the class of buggy whips.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy coding to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 16:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84139#M1114</guid>
      <dc:creator>SAS_Parilla</dc:creator>
      <dc:date>2012-04-15T16:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84140#M1115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fount it, Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 18:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84140#M1115</guid>
      <dc:creator>sasjourney</dc:creator>
      <dc:date>2012-04-15T18:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84141#M1116</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;Yeah that's true but didn't see any way to copy some part of text from word doc to excel, for example, a table from word to excel using ODS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Apr 2012 18:23:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84141#M1116</guid>
      <dc:creator>sasjourney</dc:creator>
      <dc:date>2012-04-15T18:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84142#M1117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; I guess I don't understand why you would want to copy a table from Word to Excel using ODS. Word and Excel are both proprietary Microsoft products. Word makes documents. Excel has workbooks composed of worksheets. SAS and ODS can -CREATE- output files for Word (using ODS RTF) and for Excel (using ODS CSV, ODS HTML or ODS TAGSETS.EXCELXP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; But for Word to Excel communication or transfer of document content from Word to Excel, I would not expect SAS to be able to help you much in this regard. I'm not sure where you got the idea that SAS could "copy some part of text from word doc to excel", but that is not something that would happen unless you could 1) read the Word doc with SAS and take the table from Word into a SAS dataset and then 2) once you have a SAS dataset write the dataset table to a format taht Excel can open.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; However, #1 is very problematic. Word documents are in a proprietary document format -- Word's primary purpose is to have paragraphs of text --it may have tables, but you could have a whole document without a single table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; See the code below. It is creating an RTF file based on SASHELP.SHOES and a file for Excel using the same SAS dataset. I know that this is not exactly what you said you wanted to do -- but cutting from Word and pasting into Excel does sound like something you would do with DDE or a VB Script or VBA -- Microsoft technology and not SAS technology.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods rtf file='c:\temp\two_regions.rtf' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp file='c:\temp\two_regions.xml' style=sasweb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp options(sheet_name='Asia');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.shoes nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;where region = 'Asia';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column region product sales inventory returns;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define region / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define product / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;rbreak after/ summarize;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods tagsets.excelxp options(sheet_name='Canada');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.shoes nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;where region = 'Canada';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;column region product sales inventory returns;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define region / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;define product / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;rbreak after/ summarize;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Apr 2012 18:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84142#M1117</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-04-18T18:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84143#M1118</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;Thanks for your reply and that's true, I was asking myself why do we need to do&amp;nbsp; this when both the word and excel coming from microsoft before seeing the actual problem. The problem was, we have the data coming from another source where they entered data into a word file in a table format. we can copy that table into an excel file manually and then import it to SAS. But I want to do this using only SAS instead of manually copying. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Apr 2012 17:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84143#M1118</guid>
      <dc:creator>sasjourney</dc:creator>
      <dc:date>2012-04-29T17:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Worksheets in Excel Using DDE</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84144#M1119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the task doesn't have to be automated, here is one approach you can try.&amp;nbsp; It is a method a group of us proposed in a paper that was presented at the forum last week: &lt;A href="http://www.sascommunity.org/wiki/Copy_and_Paste_Almost_Anything"&gt;http://www.sascommunity.org/wiki/Copy_and_Paste_Almost_Anything&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know if it provides a satisfactory solution to what you are trying to accomplish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it the method works for what you have to accomplish, it could be automated with some VB Script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Apr 2012 17:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Multiple-Worksheets-in-Excel-Using-DDE/m-p/84144#M1119</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-04-29T17:29:15Z</dc:date>
    </item>
  </channel>
</rss>

