LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 14 Dec 2001 03:58:43 GMT
Reply-To:     Paul Choate <pchoate@JPS.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Paul Choate <pchoate@JPS.NET>
Organization: EarthLink Inc. -- http://www.EarthLink.net
Subject:      Re: Excel Import
Content-Type: text/plain; charset=us-ascii

Thanks, but I looked in Excel and don't see a way to "defined as such in the xl sheet." The data within an Excel text cell/column doesn't have a width aasociated with it as far as I can tell.

I know I can put in an attributes definition before the set statement of a datastep, etc. But I want a general solution for any spreadsheet that I use as a datasource. HELP!

Droogendyk Bill wrote:

> Paul; > > Can't answer the getnames problem ... > > But xl character default length seems to be defined as 255. If it should > > not be, it should defined as such in the xl sheet. If your xl sheet > builder > wants to fly with defaults, you are stuck! You can change the lengths in > a > data step after you've read in the xl sheet. > > hth > > W.(Bill) Droogendyk > Quality Systems > Dofasco Inc. Hamilton ON Canada > 905 548 7200 x3359 > > SAS: Anything else is just a toy! > Manage data as if it were money! > Give Blood! Save a life! > Appointments @ 1 888 871 7201 > > -----Original Message----- > From: Paul Choate [mailto:pchoate@JPS.NET] > Sent: 13 December, 2001 8:40 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Re: Excel import strangeness > > I have the same situation in V8.01, SAS imports Excel character strings > as > $255, > and I can't get around it. I'm starting to wonder if I have a default > turned on > in the system that I don't know about. > > One other thing, my GETNAMES=NO does not work. SAS loads the first row > as > names > no matter what. > > grrrrrrrrr > > Sterling Price wrote: > > > I came across something strange today - using the following code, I can > > > import an Excel file just fine on my workstation, but someone else who > tried > > to import it wound up with all his character fields being length 255 in > > SAS > > (mine were not). > > > > We are using the same Excel file, Same operating system (NT 4.0), and > the > > same version of SAS (8.2). > > > > The same behavior occurs using the File->Import menu. > > > > Any ideas about what's going on here? > > > > PROC IMPORT OUT= WORK.IN1 > > DATAFILE= "C:\ISD Training - Test Remedy Source.xls" > > DBMS=EXCEL2000 REPLACE; > > GETNAMES=YES; > > RUN; > > > > Thanks, > > > > Sterling Price > > > > ********************************************************************** > > This email and any files transmitted with it are confidential > > and intended solely for the individual or entity to > > whom they are addressed. If you have received this email > > in error destroy it immediately. > > **********************************************************************

Paul Choate wrote:

> Hi all - > > I'm looking for a clean&simple way to control variable lengths during a > data import from Excel to SAS. The default for character variables is > $255. > > If I port Excel => DBase => SAS the columns come out okay (one byte > wider than I'd like). > > I'd like something like the scantype argument on proc access that not > only reads data type, but also picks up width. > > Please respond to my work email (I can't get the newserver at work). > > pchoate@dds.ca.gov > > Thanks - Paul


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