<?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: reading an excel file in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159978#M11961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there was only two words for Name , that would be easy to group them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;
data have;
input x $50.;
if countw(x,' ,') = 2 and not anydigit(x) then group+1;
cards;
Doe, jane
33 first st
anywhere, al&amp;nbsp; 35207
Doe, Janie
3245 Southview Cr&amp;nbsp; Homewood, AL&amp;nbsp; 34564
Doe, John
PO Box 234
Bham, AL&amp;nbsp;&amp;nbsp; 35426
Doe, Johnny
32948 Clairmont Ave
#5
Hoover, AL&amp;nbsp;&amp;nbsp; 23455
;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2015 10:27:21 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2015-02-10T10:27:21Z</dc:date>
    <item>
      <title>reading an excel file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159976#M11959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a single column excel file with full name on first line followed be some form of an address on the next 1 to 3 lines.&lt;/P&gt;&lt;P&gt;I need to create observations with separate variables for first name, last name, first and second address(if&amp;nbsp; available), city, state and zip.&lt;/P&gt;&lt;P&gt;A comma always follows the city name, no matter what the configuration of the data is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;column 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Doe, jane&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;33 first st&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;anywhere, al&amp;nbsp; 35207&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Doe, Janie&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3245 Southview Cr&amp;nbsp; Homewood, AL&amp;nbsp; 34564&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Doe, John&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;PO Box 234&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Bham, AL&amp;nbsp;&amp;nbsp; 35426&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Doe, Johnny&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;32948 Clairmont Ave&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;#5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Hoover, AL&amp;nbsp;&amp;nbsp; 23455&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159976#M11959</guid>
      <dc:creator>uabcms</dc:creator>
      <dc:date>2015-02-09T22:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: reading an excel file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159977#M11960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good luck. With single addresses on multiple lines and incorrect ZIP code state combinations (23455 is VA not AL), the street and city/state on one line I hope you don't too many of these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With something like this I'd start with:&lt;/P&gt;&lt;P&gt;No digits -&amp;gt; likely to be a name&lt;/P&gt;&lt;P&gt;Fewer than 5 or more than 5 but fewer than 9 digits -&amp;gt; likely to be at least part of a street address&lt;/P&gt;&lt;P&gt;If exactly 5 or 9 digits and a comma then check the number of a valid zip code (function ZIPCITY may help).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Names are likely to be a headache all by themselves depending on who compiled this:&lt;/P&gt;&lt;P&gt;Smith Jr. , John&lt;/P&gt;&lt;P&gt;Smith , John Jr&lt;/P&gt;&lt;P&gt;John Smith Jr&lt;/P&gt;&lt;P&gt;Dr John Smith Jr (and permutations and other honorifics Miss, Ms, Mrs, Mr, Reverand, Doctor and others abbreviated and/or spelled out)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For *********** sake, this is 2015. Who is still putting first and last name in the same field (government agencies aside).&lt;/P&gt;&lt;P&gt;If this spreadsheet was exported from another application go back and research output options from that app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 23:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159977#M11960</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-02-09T23:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: reading an excel file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159978#M11961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there was only two words for Name , that would be easy to group them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;
data have;
input x $50.;
if countw(x,' ,') = 2 and not anydigit(x) then group+1;
cards;
Doe, jane
33 first st
anywhere, al&amp;nbsp; 35207
Doe, Janie
3245 Southview Cr&amp;nbsp; Homewood, AL&amp;nbsp; 34564
Doe, John
PO Box 234
Bham, AL&amp;nbsp;&amp;nbsp; 35426
Doe, Johnny
32948 Clairmont Ave
#5
Hoover, AL&amp;nbsp;&amp;nbsp; 23455
;
run;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 10:27:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159978#M11961</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-02-10T10:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: reading an excel file</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159979#M11962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, it's a mess.&amp;nbsp; Am checking other output options.&lt;/P&gt;&lt;P&gt;BTW,&amp;nbsp; i just made started typing #'s for the zips for the example data.&amp;nbsp; The zips in the file are correct.&lt;/P&gt;&lt;P&gt;Thanks for responding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 15:12:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/reading-an-excel-file/m-p/159979#M11962</guid>
      <dc:creator>uabcms</dc:creator>
      <dc:date>2015-02-10T15:12:02Z</dc:date>
    </item>
  </channel>
</rss>

