<?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: Read a table from Word into SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19433#M3013</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for not marking the questions since I am very new to this discussion board. I have marked it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I meant the find/replace in word worked well. Now, I have followed your instruction without changing anything; however, I got error message which said '&lt;/P&gt;&lt;P&gt; File WORK.HAVE.DATA does not exist'. I think I did not run the Marco correctly. How did you set up the values for the Macros (%flipfile; %expandr (type,string); %filarray (type,string);)? Below are the step that I tried after i replaced paragraph:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Copy the Macro in to SAS&lt;/P&gt;&lt;P&gt;(begining of the macro)&lt;/P&gt;&lt;P&gt;options NOQUOTELENMAX; &lt;/P&gt;&lt;P&gt;options datestyle=mdy; &lt;/P&gt;&lt;P&gt;filename clippy clipbrd;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;%macro filarray (type,string);&lt;/P&gt;&lt;P&gt;if scan("&amp;amp;string.",i," ") ne "" then&lt;/P&gt;&lt;P&gt;&amp;amp;type(scan(scan("&amp;amp;string.",i," "),1,"~"))=&lt;/P&gt;&lt;P&gt;scan(scan("&amp;amp;string.",i," "),2,"~");&lt;/P&gt;&lt;P&gt;%mend filarray;&lt;/P&gt;&lt;P&gt;(end of the marco)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Highlight the word table -&amp;gt; Ctrl + C &lt;/P&gt;&lt;P&gt;Step 3: Run the Marco in Step 1&lt;/P&gt;&lt;P&gt;Step 4: Run your codes below&lt;/P&gt;&lt;P&gt;(begining of the codes)&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length dependents $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Relationship $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(dependents=_dep&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=_rel));&lt;/P&gt;&lt;P&gt;&amp;nbsp; address=translate(address," ","~");&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _i=1 to max(countw(_dep,"~"),countw(_Rel,"~"));;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents=scan(_dep,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=scan(_rel,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;(end of the codes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for asking this Marco question, I am still learning the Marco. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2011 01:46:25 GMT</pubDate>
    <dc:creator>Belle</dc:creator>
    <dc:date>2011-10-03T01:46:25Z</dc:date>
    <item>
      <title>Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19421#M3001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Members,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My final goal is to merge two tables, one is from Excel, and the other one is from Word; however, I am having difficulty in importing a table from Word into SAS.&amp;nbsp; In Word, you can have hardenters in the cells. For example, in the Address column of the tables below (Table 1), there is a hardenter after San Francisco. I tried to copied this table into Excel, it turned out there were multiple rows for ID 1. The whole table was messed up so that I cannot merge into the Excel table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any ways to read Word table into SAS directly without messing up each row? Or if there are any ways to convert Word table into Excel so that I can read them into SAS, and then merge them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 1: Word Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" height="296" style="border: medium none; padding: 0pt 5.4pt; width: 666px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="border: 1pt solid windowtext; padding: 0pt 5.4pt;" valign="top" width="53"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="76"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Name&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="136"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Address&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;dependents&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: windowtext windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Relationship&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0pt 5.4pt;" valign="top" width="53"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;1&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="76"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Mary&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="136"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;San&amp;nbsp; Francisco&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;CA&amp;nbsp; - 94115&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Bob&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Jenny&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Son&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Daughter&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0pt 5.4pt;" valign="top" width="53"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;2&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="76"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Robert&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="136"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;234&amp;nbsp; Stress&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Oakland&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;CA&amp;nbsp; -94623&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;JJ&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Christina&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Daughter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Daughter&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: -moz-use-text-color windowtext windowtext; padding: 0pt 5.4pt;" valign="top" width="53"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;5&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="76"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Lucia&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="136"&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-family: 'Times New Roman','serif'; font-size: 8pt;"&gt;Los&amp;nbsp; Angeles&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; padding: 0pt 5.4pt;" valign="top" width="162"&gt;&lt;P&gt;&lt;/P&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table 2: Excel Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" class="jiveNoBorder" height="109" style="border-color: #000000; border-style: solid; border-width: 0px; width: 241px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="16" width="48"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="48"&gt;Hours&lt;/TD&gt;&lt;TD class="xl65" style="border-left: medium none;" width="48"&gt;Pay rate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16" style="border-top: medium none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16" style="border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;35&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16" style="border-top: medium none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;35&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl66" height="16" style="border-top: medium none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;40&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: medium none; border-left: medium none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all, Any supplementary information is highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Belle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 04:20:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19421#M3001</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-09-29T04:20:27Z</dc:date>
    </item>
    <item>
      <title>Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19422#M3002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Belle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try converting your word document table to an excel sheet. Please go through the following link. It has enough information to convert word table to excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ehow.com/how_2096574_convert-microsoft-word-table-excel.html"&gt;http://www.ehow.com/how_2096574_convert-microsoft-word-table-excel.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried converting a word table to excel, it worked for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dhanasekaran R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 09:56:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19422#M3002</guid>
      <dc:creator>dhana</dc:creator>
      <dc:date>2011-09-29T09:56:19Z</dc:date>
    </item>
    <item>
      <title>Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19423#M3003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Belle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the word file can be highlighted (i.e., select all) and copied to your clipboard (i.e., Ctrl-c), I may have a solution for you.&amp;nbsp; It is the topic of a presentation that I'll be giving at next year's SGF, but we have never tested it on the particular kind of file you describe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The powerpoint, paper and code are available at &lt;A href="http://torsas.ca/page18.php"&gt;http://torsas.ca/page18.php&lt;/A&gt; which is the website for my local user group, namely the Toronto Area SAS Society.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't mind, I'd really like to test the code on your particular file.&amp;nbsp; If the word document can be shared, please send me a copy at art297 at rogers dot com.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2011 12:56:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19423#M3003</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-29T12:56:51Z</dc:date>
    </item>
    <item>
      <title>Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19424#M3004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dhanasekaran,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the information; however it does not work for my case because it becomes mutiple rows as I mentioned. Table will be messed up after reading into SAS. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I got after I converted it into Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="test.png" class="jive-image" src="https://communities.sas.com/legacyfs/online/1183_test.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for the help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2011 01:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19424#M3004</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-09-30T01:47:27Z</dc:date>
    </item>
    <item>
      <title>Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19425#M3005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot share the original tables with you because of company's policy. I wish I could share it. &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.sas.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually the table I showed here were fake tables. They contain the information/problem that I am facing. I'll send you these two tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate your help, hopefully this problem can be solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Belle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2011 01:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19425#M3005</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-09-30T01:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19426#M3006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Belle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First the good news: I was able to import your data.&amp;nbsp; You may not agree with how I eventually structured the file, but that part should be relatively easy for you to change.&amp;nbsp; Since SAS doesn't have merged cells, I split merged cells into multiple records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;﻿﻿&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;Obs&amp;nbsp;&amp;nbsp; ID&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp; Address&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents&amp;nbsp;&amp;nbsp; Relationship&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mary&amp;nbsp;&amp;nbsp;&amp;nbsp; San Francisco CA - 94115&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bob&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Son&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mary&amp;nbsp;&amp;nbsp;&amp;nbsp; San Francisco CA - 94115&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jenny&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Daughter&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Robert&amp;nbsp;&amp;nbsp; 234 Stress Oakland CA -94623&amp;nbsp; JJ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Daughter&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Robert&amp;nbsp;&amp;nbsp; 234 Stress Oakland CA -94623&amp;nbsp; Christina&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Daughter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: 'Times New Roman', serif;"&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Times New Roman', serif; font-size: 12pt;"&gt;5&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lucia&amp;nbsp; Los Angeles &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It definitely wasn't as straight forward as I would have liked, but only took seconds to accomplish once I figured out what the problem was.&amp;nbsp; MS Word doesn't really have soft returns in its merged cells .. they copy and paste as non-merged cells with hard carriage returns.&amp;nbsp; Thus the first task that had to be accomplished was to highlight the table in Word and replace all Paragraphs with tildes (i.e., ~).&amp;nbsp; If you don't know how to do that let me know and I'll describe the steps&amp;nbsp; That entire process literally took about 10 seconds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I highlighted and copied the now modified table and ran the code I gave you the link for this afternoon. The following are the settings I used at the top of the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options NOQUOTELENMAX;&lt;/P&gt;&lt;P&gt;options datestyle=mdy;&lt;/P&gt;&lt;P&gt;filename clippy clipbrd;&lt;/P&gt;&lt;P&gt;filename revised temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let transpose=NO;&lt;/P&gt;&lt;P&gt;%let columns=;&lt;/P&gt;&lt;P&gt;%let rows=;&lt;/P&gt;&lt;P&gt;%let look_for=;&lt;/P&gt;&lt;P&gt;%let skip_lines=;&lt;/P&gt;&lt;P&gt;%let hrows=1;&lt;/P&gt;&lt;P&gt;%let spaces="&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ";&lt;/P&gt;&lt;P&gt;%let first_data_row=2;&lt;/P&gt;&lt;P&gt;%let var_renames=;&lt;/P&gt;&lt;P&gt;%let var_labels=;&lt;/P&gt;&lt;P&gt;%let var_share=;&lt;/P&gt;&lt;P&gt;%let var_prefix=;&lt;/P&gt;&lt;P&gt;%let var_suffix=;&lt;/P&gt;&lt;P&gt;%let var_drop=;&lt;/P&gt;&lt;P&gt;%let var_upcase=;&lt;/P&gt;&lt;P&gt;%let var_missing=;&lt;/P&gt;&lt;P&gt;%let var_formats=;&lt;/P&gt;&lt;P&gt;%let var_informats=;&lt;/P&gt;&lt;P&gt;%let var_units=;&lt;/P&gt;&lt;P&gt;%let guessingrows=;&lt;/P&gt;&lt;P&gt;%let outfile=have;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e., I didn't have to change anything or set anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I ran the following datastep:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length dependents $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Relationship $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(dependents=_dep&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=_rel));&lt;/P&gt;&lt;P&gt;&amp;nbsp; address=translate(address," ","~");&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _i=1 to max(countw(_dep,"~"),countw(_Rel,"~"));;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents=scan(_dep,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=scan(_rel,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I ran one extra datastep as I figured that you wanted the variables in the same order as you had them in the original file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain ID Name Address dependents Relationship;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2011 06:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19426#M3006</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-09-30T06:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19427#M3007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe there is another workaround way.&lt;/P&gt;&lt;P&gt;When you&amp;nbsp; tried to copied this table into Excel, at Excel' menu ,Edit -&amp;gt;Optional Paste-&amp;gt;Text. It maybe will filter these annoying character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 09:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19427#M3007</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-10-02T09:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19428#M3008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ksharp,&amp;nbsp; That (the paste-&amp;gt;text) option was the first thing I tried before suggesting the above approach.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 14:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19428#M3008</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-02T14:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19429#M3009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for trying my tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to follow your steps, but I did encounter a problem on replacing all Paragraphs with tildes (i.e., ~). Here is what i did: Highlight whole table -&amp;gt; click replace -&amp;gt; type "~" in REPLACE option; My question is what should I put in FIND option? Did I select wrong option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Replace.png" class="jive-image-thumbnail jive-image" onclick="" src="https://communities.sas.com/legacyfs/online/1191_Replace.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 16:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19429#M3009</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-10-02T16:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19430#M3010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You only missed one step.&amp;nbsp; On the replace screen, under find, click on 'more' at the bottom left of the screen.&amp;nbsp; Then click on 'special'.&amp;nbsp; The click on 'Paragraph Mark' which, on my version of Word, is the first option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, do like you did, indicating ~ as the replacement character, click on replace all, then when it finishes indicate that, NO, you don't want it to continue with the rest of the document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 16:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19430#M3010</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-02T16:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19431#M3011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Art, it works well. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 17:39:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19431#M3011</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-10-02T17:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19432#M3012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Belle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You didn't mark the question as having been answered, so others will probably still spend time trying to come up with alternative solutions.&amp;nbsp; If that is what you want, leave it as being unanswered, otherwise you really should click on the icon that indicates that the question has been answered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless, I'm still curious about what worked well.&amp;nbsp; I presume that you meant the find/replace in Word.&amp;nbsp; I am mostly interested in whether you were able to import the file and, if so, whether you used the code I proposed or proc import.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Oct 2011 22:25:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19432#M3012</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-02T22:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19433#M3013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for not marking the questions since I am very new to this discussion board. I have marked it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I meant the find/replace in word worked well. Now, I have followed your instruction without changing anything; however, I got error message which said '&lt;/P&gt;&lt;P&gt; File WORK.HAVE.DATA does not exist'. I think I did not run the Marco correctly. How did you set up the values for the Macros (%flipfile; %expandr (type,string); %filarray (type,string);)? Below are the step that I tried after i replaced paragraph:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Copy the Macro in to SAS&lt;/P&gt;&lt;P&gt;(begining of the macro)&lt;/P&gt;&lt;P&gt;options NOQUOTELENMAX; &lt;/P&gt;&lt;P&gt;options datestyle=mdy; &lt;/P&gt;&lt;P&gt;filename clippy clipbrd;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;%macro filarray (type,string);&lt;/P&gt;&lt;P&gt;if scan("&amp;amp;string.",i," ") ne "" then&lt;/P&gt;&lt;P&gt;&amp;amp;type(scan(scan("&amp;amp;string.",i," "),1,"~"))=&lt;/P&gt;&lt;P&gt;scan(scan("&amp;amp;string.",i," "),2,"~");&lt;/P&gt;&lt;P&gt;%mend filarray;&lt;/P&gt;&lt;P&gt;(end of the marco)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Highlight the word table -&amp;gt; Ctrl + C &lt;/P&gt;&lt;P&gt;Step 3: Run the Marco in Step 1&lt;/P&gt;&lt;P&gt;Step 4: Run your codes below&lt;/P&gt;&lt;P&gt;(begining of the codes)&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length dependents $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Relationship $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(dependents=_dep&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=_rel));&lt;/P&gt;&lt;P&gt;&amp;nbsp; address=translate(address," ","~");&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _i=1 to max(countw(_dep,"~"),countw(_Rel,"~"));;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents=scan(_dep,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=scan(_rel,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;(end of the codes)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for asking this Marco question, I am still learning the Marco. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 01:46:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19433#M3013</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-10-03T01:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19434#M3014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The code was designed so that one doesn't have to know or understand macros.&amp;nbsp; The only critical parts of the code are defining the macro variables up front.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, the code was designed so that one simply copies the entire set of code (as posted on the TASS (i.e., &lt;A href="http://www.torsas.ca)" target="_blank"&gt;www.torsas.ca)&lt;/A&gt; website, ensue that all of the macro variables are set correctly, copy the file you want to import, then press run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The most critical aspect that might have to be changed, as it is system dependent, is the macro variable &lt;/P&gt;&lt;P&gt;%let spaces="&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "; *number of consecutive spaces that should be translated&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to represent a horizontal tab;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In on computer that is 4 spaces that have to be included between the pair of double quotes, but it may be 6 on some systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would need to see the code you actually submitted, and the log, in order to answer your question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, at this point you don't really need my code to do the job:&amp;nbsp; proc import should work quite nicely for you as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 02:29:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19434#M3014</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-03T02:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19435#M3015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am confused. I ran the three macros (%flipfile; %expandr (type,string); %filarray (type,string);). The questions is if I need to set up the values for each macro. for example,&lt;/P&gt;&lt;P&gt;(1) When I run %flipfile; do I need to assign vaules? &lt;/P&gt;&lt;P&gt;(2) For %expandr (type,string); what do type and string equal to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my first ran, I did not assign anything for them. Here are the messages from log:&lt;/P&gt;&lt;P&gt;......&amp;nbsp; (run first two macros)&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P&gt;1227&amp;nbsp; %macro filarray (type,string);&lt;/P&gt;&lt;P&gt;1228&amp;nbsp; if scan("&amp;amp;string.",i," ") ne "" then&lt;/P&gt;&lt;P&gt;1229&amp;nbsp; &amp;amp;type(scan(scan("&amp;amp;string.",i," "),1,"~"))=&lt;/P&gt;&lt;P&gt;1230&amp;nbsp; scan(scan("&amp;amp;string.",i," "),2,"~");&lt;/P&gt;&lt;P&gt;1231&amp;nbsp; %mend filarray;&lt;/P&gt;&lt;P&gt;1232&lt;/P&gt;&lt;P&gt;1233&lt;/P&gt;&lt;P&gt;1234&lt;/P&gt;&lt;P&gt;1235&amp;nbsp; data want (drop=_:);&lt;/P&gt;&lt;P&gt;1236&lt;/P&gt;&lt;P&gt;1237&amp;nbsp;&amp;nbsp;&amp;nbsp; length dependents $15;&lt;/P&gt;&lt;P&gt;1238&lt;/P&gt;&lt;P&gt;1239&amp;nbsp;&amp;nbsp;&amp;nbsp; length Relationship $15;&lt;/P&gt;&lt;P&gt;1240&lt;/P&gt;&lt;P&gt;1241&amp;nbsp;&amp;nbsp;&amp;nbsp; set have (rename=(dependents=_dep&lt;/P&gt;&lt;P&gt;1242&lt;/P&gt;&lt;P&gt;1243&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=_rel));&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: File WORK.HAVE.DATA does not exist.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1244&lt;/P&gt;&lt;P&gt;1245&amp;nbsp;&amp;nbsp;&amp;nbsp; address=translate(address," ","~");&lt;/P&gt;&lt;P&gt;1246&lt;/P&gt;&lt;P&gt;1247&amp;nbsp;&amp;nbsp;&amp;nbsp; do _i=1 to max(countw(_dep,"~"),countw(_Rel,"~"));;&lt;/P&gt;&lt;P&gt;1248&lt;/P&gt;&lt;P&gt;1249&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents=scan(_dep,_i,"~");&lt;/P&gt;&lt;P&gt;1250&lt;/P&gt;&lt;P&gt;1251&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=scan(_rel,_i,"~");&lt;/P&gt;&lt;P&gt;1252&lt;/P&gt;&lt;P&gt;1253&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;1254&lt;/P&gt;&lt;P&gt;1255&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;1256&lt;/P&gt;&lt;P&gt;1257&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Line):(Column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1245:21&amp;nbsp;&amp;nbsp; 1247:25&amp;nbsp;&amp;nbsp; 1247:42&amp;nbsp;&amp;nbsp; 1249:21&amp;nbsp;&amp;nbsp; 1251:23&lt;/P&gt;&lt;P&gt;NOTE: Character values have been converted to numeric values at the places given by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Line):(Column).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1245:11&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;WARNING: The data set WORK.WANT may be incomplete.&amp;nbsp; When this step was stopped there were 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; observations and 3 variables.&lt;/P&gt;&lt;P&gt;WARNING: Data set WORK.WANT was not replaced because this step was stopped.&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Belle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 03:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19435#M3015</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-10-03T03:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19436#M3016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another question, when you mentioned that I did not need to use your codes. Did you mean marcos, or you mean your codes start from data want (drop=_:);? Also how should I use proc import? Do I still import table from Word to SAS by using proc import? Sorry for all the confusion. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Belle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 03:50:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19436#M3016</guid>
      <dc:creator>Belle</dc:creator>
      <dc:date>2011-10-03T03:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read a table from Word into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19437#M3017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The proc import method I used included:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Replacing the paragraph marks with ~s in word&lt;/P&gt;&lt;P&gt;2. Copying the table and pasting it into Excel, then saving it as a.xls in Excel97 format&lt;/P&gt;&lt;P&gt;3. Running the following code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc import datafile='c:\art\a.xls'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out=have&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbms=xls&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; replace;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getnames=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; datarow=2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length dependents $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Relationship $15;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have (rename=(dependents=_dep&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=_rel));&lt;/P&gt;&lt;P&gt;&amp;nbsp; address=translate(address," ","~");&lt;/P&gt;&lt;P&gt;&amp;nbsp; do _i=1 to max(countw(_dep,"~"),countw(_Rel,"~"));;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependents=scan(_dep,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Relationship=scan(_rel,_i,"~");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain ID Name Address dependents Relationship;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set want;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But please send me, off line (art297 at rogers dot com) a copy of the log you got when you ran the code that I initially proposed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2011 12:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-a-table-from-Word-into-SAS/m-p/19437#M3017</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-10-03T12:43:49Z</dc:date>
    </item>
  </channel>
</rss>

