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 (August 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Aug 2008 10:42:11 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: proc import question
Comments: To: "Mark S." <marksmolkin@GMAIL.COM>


I agree with Ron that the problem may well be that the column of concern has a blank in one of the records.

I usually get around such problems by using the excel libname engine, rather than proc import, and control what is read by preparing a template of the data types I want.

For example:

libname xlsIN 'c:\exceldata.xls';

data template; format a 2.; format b 2.; format c 2.; input a b c; cards; 1 1 1 ;

data want; set template xlsIN.'sheet1$'n; if _n_ gt 1 then output; run ;

HTH, Art -------- On Fri, 29 Aug 2008 10:02:50 -0400, Mark S. <marksmolkin@GMAIL.COM> wrote:

>Hi, > >I am trying to learn the basics of proc import and am slowly making >progress. I often need to work on somewhat dirty spreadsheets in Excel and >so I learned to use the mixed=yes option in proc import and additionally >have changed the value of 'typeguessrows' in the Windows registry to a >very large value...My question: With the latest dataset I am working with, >there are numerous numeric rows that are correctly getting read into SAS >as numeric, and, mixed rows appropriately being created as character. For >some reason, though, there are other seemingly 'numeric' rows in the Excel >file (without any apparent character values) that are stubbornly being >forced to character when read into SAS. I can't figure out why. Has >anybody noticed this too and is there some other attribute in these Excel >data columns that is forcing SAS to have this effect? Thanks for the >help.... > > >Mark

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