LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 15 Feb 2008 09:39:23 -0500
Reply-To:     Ben <benpub7@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ben <benpub7@YAHOO.COM>
Subject:      Re: import .xls data
Comments: To: paulchoate61@GMAIL.COM

Hi Paul,

Thank you, it is an answer I expected to get. brilliant.

On Thu, 14 Feb 2008 14:04:19 -0800, pchoate <paulchoate61@GMAIL.COM> wrote:

>Hi Ben - > >Without a foreknowledge of the data the only "safe" format is a >character format. Here is an example of how the dbsastype dataset >option can control input of Excel columns. > >libname exbk excel 'SasHelp.xls' ; >DATA exbk.Class; > SET SASHelp.Class; > Blanks=' '; > Missings=.; > Missings2='.'; > >run; >libname exbk clear; > >libname exbk excel 'SasHelp.xls' ; >DATA Class1; > SET exbk.Class; >DATA Class2; > SET exbk.Class(dbsastype=(height='CHAR(8)' > blanks='CHAR(8)' > Missings='CHAR(8)' > Missings2='CHAR(8)')); >run; >libname exbk clear; > >Note how the decimals on Height didn't come through quite the same - >beware of rounding issues. > > >More info here: >www2.sas.com/proceedings/sugi31/024-31.pdf >www2.sas.com/proceedings/forum2007/119-2007.pdf > >hth - Paul Choate > > >On Feb 14, 12:14 pm, benp...@YAHOO.COM (Ben) wrote: >> It seems that the statement "mixed=YES;" in PROC IMPORT does not always >> work. >> >> wonder if there is an option or statement we can use to tell SAS to keep >> column's character type no matter what the data value in excel looks like, >> no guessing. >> >> Many Thanks.


Back to: Top of message | Previous page | Main SAS-L page