<?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 Can't Read missing data from excel in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Can-t-Read-missing-data-from-excel/m-p/9692#M732</link>
    <description>I'm using the following code: &lt;BR /&gt;
PROC IMPORT OUT= WORK.SET1 &lt;BR /&gt;
            DATAFILE= "C:\Documents and Settings\wkuuser\Desktop\TEST_EXCEL1.xls"&lt;BR /&gt;
            DBMS=EXCEL REPLACE;&lt;BR /&gt;
     SHEET="Sheet1"; &lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
     MIXED=no;&lt;BR /&gt;
     SCANTEXT=YES;&lt;BR /&gt;
     USEDATE=YES;&lt;BR /&gt;
     SCANTIME=YES; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
and when I read the following data from exel:&lt;BR /&gt;
&lt;BR /&gt;
y	V1	V2	V3	V4	V5&lt;BR /&gt;
.	.	.	.	2	3&lt;BR /&gt;
50	.	2	3	5	.&lt;BR /&gt;
75	.	.	4	1	0&lt;BR /&gt;
2	3	4	5	6	7&lt;BR /&gt;
.	.	.	.	.	1&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The column for V1and v2  becomes all missing and character.&lt;BR /&gt;
If I change the option above to MIXED = yes then everything reads in fine, but everything is character. Has anyone had a problem like this? I don't know much about the import procedure so maybe there is something I don't know about. &lt;BR /&gt;
&lt;BR /&gt;
If I use my code above and the missing values are just blank cells in excel, then all is well, but I'm not sure I really want to have my data entered that way, and I often get data with '.' for missing. &lt;BR /&gt;
&lt;BR /&gt;
I've never really had trouble with importing data  before, so any advice would be appreciated. -Thanks</description>
    <pubDate>Mon, 23 Mar 2009 21:27:09 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-23T21:27:09Z</dc:date>
    <item>
      <title>Can't Read missing data from excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-t-Read-missing-data-from-excel/m-p/9692#M732</link>
      <description>I'm using the following code: &lt;BR /&gt;
PROC IMPORT OUT= WORK.SET1 &lt;BR /&gt;
            DATAFILE= "C:\Documents and Settings\wkuuser\Desktop\TEST_EXCEL1.xls"&lt;BR /&gt;
            DBMS=EXCEL REPLACE;&lt;BR /&gt;
     SHEET="Sheet1"; &lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
     MIXED=no;&lt;BR /&gt;
     SCANTEXT=YES;&lt;BR /&gt;
     USEDATE=YES;&lt;BR /&gt;
     SCANTIME=YES; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
and when I read the following data from exel:&lt;BR /&gt;
&lt;BR /&gt;
y	V1	V2	V3	V4	V5&lt;BR /&gt;
.	.	.	.	2	3&lt;BR /&gt;
50	.	2	3	5	.&lt;BR /&gt;
75	.	.	4	1	0&lt;BR /&gt;
2	3	4	5	6	7&lt;BR /&gt;
.	.	.	.	.	1&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
The column for V1and v2  becomes all missing and character.&lt;BR /&gt;
If I change the option above to MIXED = yes then everything reads in fine, but everything is character. Has anyone had a problem like this? I don't know much about the import procedure so maybe there is something I don't know about. &lt;BR /&gt;
&lt;BR /&gt;
If I use my code above and the missing values are just blank cells in excel, then all is well, but I'm not sure I really want to have my data entered that way, and I often get data with '.' for missing. &lt;BR /&gt;
&lt;BR /&gt;
I've never really had trouble with importing data  before, so any advice would be appreciated. -Thanks</description>
      <pubDate>Mon, 23 Mar 2009 21:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-t-Read-missing-data-from-excel/m-p/9692#M732</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-23T21:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can't Read missing data from excel</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Can-t-Read-missing-data-from-excel/m-p/9693#M733</link>
      <description>Answering my own post:&lt;BR /&gt;
&lt;BR /&gt;
"SAS uses the first eight rows of data to determine whether the variable should be read as character or numeric.  The default setting mixed=no assumes that each variable is either all character or all numeric.  If  you have a variable with both character and numeric values or a variable with missing values use mixed=yes statement to be sure SAS will read it correctly.  "&lt;BR /&gt;
&lt;BR /&gt;
From: &lt;A href="http://www.ats.ucla.edu/stat/sas/faq/rwxls8.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/faq/rwxls8.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
So, all I have to do is enter the first 8 rows with an impossible value like 999 and then the rest of the data set can have '.' indicators for missing values and SAS knows that they are supposed to be defined as numeric. Before Analysis I can either subset the data WHERE Y NE 999 or just use the where statement in the proc I'm using. &lt;BR /&gt;
&lt;BR /&gt;
If anyone knows a more efficient way to do this, I'd love to hear, but this seems like it will work for me for now!&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Tue, 24 Mar 2009 18:07:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Can-t-Read-missing-data-from-excel/m-p/9693#M733</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-24T18:07:47Z</dc:date>
    </item>
  </channel>
</rss>

