<?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: PROC IMPORT wrong data type in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23043#M5049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I believe the behavior you are seeing is because of the EXCEL data engine not SAS.&lt;/P&gt;&lt;P&gt;I know of two work arounds 1) don't let the Excel sheet get populated with the (.)&lt;/P&gt;&lt;P&gt;2)save each sheet as CSV and then the problem either goes away or the guessingrows will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jan 2012 15:10:38 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2012-01-03T15:10:38Z</dc:date>
    <item>
      <title>PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23040#M5046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, could anyone provide me with understanding of the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Situation: I am importing with PROC IMPORT experimental response data stored in five Excel sheets (response data for five different coating types). In each sheet, the response column has 300 obs, all numeric values except for a (very) few missing values denoted in the sheet by a dot (.). Only two of the five sheets have missing responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem: For the two sheets that contain missing values, SAS imports the response column as character datatype. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that the datatype for the column is determined based on the first 8 rows. The missing values are way below these first rows, so 100% sure SAS should import this column as numeric datatype. Why doesn't it?! How to remedy?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%MACRO makeds;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%do i=1 %to 5;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;filename ref '...&amp;amp;i..xls';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;PROC IMPORT out=work.intermediate datafile=ref dbms=xls replace;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sheet="Sheet1";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RUN;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DATA mylib.coating&amp;amp;i;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set work.intermediate;&amp;nbsp; --&amp;gt; intermediate dataset has character column when sheet contains some missing values (.), why??&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; coating=&amp;amp;i;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RUN;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%end;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;%MEND makeds;&lt;/EM&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;&lt;P&gt;Many thanks for your insights!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 14:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23040#M5046</guid>
      <dc:creator>juniorSAScap</dc:creator>
      <dc:date>2012-01-03T14:51:54Z</dc:date>
    </item>
    <item>
      <title>PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23041#M5047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the guessingrows option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 14:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23041#M5047</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-03T14:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23042#M5048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I did, now all five sheets are imported with response column as character datatype...even worse &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also it says guessingrows is invalid option. XLS are not delimited files, while guessingrows option is restricted to delimited files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:03:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23042#M5048</guid>
      <dc:creator>juniorSAScap</dc:creator>
      <dc:date>2012-01-03T15:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23043#M5049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I believe the behavior you are seeing is because of the EXCEL data engine not SAS.&lt;/P&gt;&lt;P&gt;I know of two work arounds 1) don't let the Excel sheet get populated with the (.)&lt;/P&gt;&lt;P&gt;2)save each sheet as CSV and then the problem either goes away or the guessingrows will work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:10:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23043#M5049</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-01-03T15:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23044#M5050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending upon how old a version of excel you are using, there is another option:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.listserv.uga.edu/cgi-bin/wa?A2=ind1007A&amp;amp;L=sas-l&amp;amp;P=R3424&amp;amp;D=1&amp;amp;H=0&amp;amp;O=D&amp;amp;T=1&amp;amp;m=315710"&gt;http://www.listserv.uga.edu/cgi-bin/wa?A2=ind1007A&amp;amp;L=sas-l&amp;amp;P=R3424&amp;amp;D=1&amp;amp;H=0&amp;amp;O=D&amp;amp;T=1&amp;amp;m=315710&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It was for the older excel versions and I haven't seen an update for 2007+ if you happen to be using a newer version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 15:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23044#M5050</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-03T15:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC IMPORT wrong data type</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23045#M5051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try to use option&lt;/P&gt;&lt;P&gt;mixed=yes&lt;/P&gt;&lt;P&gt;This will produce character variable if your column is mixed with number and non-number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jan 2012 03:48:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-IMPORT-wrong-data-type/m-p/23045#M5051</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-01-04T03:48:40Z</dc:date>
    </item>
  </channel>
</rss>

