Date: Thu, 15 Nov 2007 08:34:48 -0500
Reply-To: Nathaniel.Wooding@DOM.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Nat Wooding <Nathaniel.Wooding@DOM.COM>
Subject: Re: Importing mixed datatype fields into SAS
In-Reply-To: <9b5abea60711140849u77ef34b1rb0839f6f939f91b0@mail.gmail.com>
Content-Type: text/plain; charset="US-ASCII"
Sa
If this is a one time situation, you may simply wish to insert a dummy row
at the start of the worksheet and put character and numeric values in the
appropriate columns. This would let Import do it's work properly and you
would, of course, delete this row after you import the data.
If, however, you need to do this on a regular basis, you may want to try
one of the other solutions that have been offered. I have not read Ed's
paper so I don't know what he suggests. One additional possible solution
would be to use DDE.
Nat Wooding
Environmental Specialist III
Dominion, Environmental Biology
4111 Castlewood Rd
Richmond, VA 23234
Phone:804-271-5313, Fax: 804-271-2977
souga soga
<souga1234@GMAIL.
COM> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
<SAS-L@LISTSERV.U
GA.EDU> Subject
Importing mixed datatype fields
into SAS
11/14/2007 11:49
AM
Please respond to
souga soga
<souga1234@GMAIL.
COM>
Hi,
I am trying to import excel data into SAS using proc import . One of the
fields has a mixed datatype i.e has
numeric and text data which i would like to import as character.
This is what i am using which doesn't work, it takes the mixed data type
field and converts it to numeric and
puts missing in the place of text.
*
PROC* *IMPORT* OUT= WORK.TEST
DATAFILE= "XXXXAnalysis.xls" DBMS=EXCEL REPLACE;
SHEET="'YYYY$'";
GETNAMES=Yes;
MIXED=YES;
range = "A6:K138";
*
RUN*;
All help is much appreciated as always.
Thanks,
Sa
-----------------------------------------
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.