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 (September 1999, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 3 Sep 1999 08:28:26 -0400
Reply-To:     bramley.m@PG.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         bramley.m@PG.COM
Subject:      SAS-L Archives
Content-type: text/plain; charset=us-ascii

Does anyone have the blurb on accessing the archives for this list or an address where I can get the blurb?

TIA,

Michael Bramley

Internet Mail Message Received from host: mailgw.cc.uga.edu [128.192.1.101]

From: Hockey Richard <rhockey@mater.org.au> on 09/02/99 01:59 AM

Please respond to Hockey Richard <rhockey@mater.org.au>

To: sas-l@listserv.uga.edu cc: (bcc: Michael Bramley-M/PGI) Subject: Importing Excel files into SAS

Hi I just found atech note on the SAS site which solves some of the problems I have had importing Excel data into SAS, particularly when I have mixed data in a field. It is at : http://www.sas.com/service/techsup/unotes/V6/D/D947.html There is also an addon to import excel97 files but I wouldn't recommend it. It is sooo sloww!!! RH

Here is the contents of the tech note:

SAS/ACCESS reads date fields in as character if first created as text

If you are reading in an Excel spreadsheet that contains date fields which were originally created as text fields, SAS/ACCESS to PC File Formats will read the field in as character.

If you create an excel text field that contains dates, then you use

FORMAT-->CELLS to change the field to a date (mmddyy) field, excel

does not change the internal storage of the data. It is still

being stored as character (text) data, but is being displayed as a

date type. Excel is failing to convert the value to a date (numeric).

Therefore when the field it read into SAS it becomes a character '

variable.

To circumvent this problem you must force Excel to change the storage

of the field by doing the following within Excel:

Choose DATA --> Text to Columns

Select Fixed Width, then click NEXT button 2 times

In upper right corner of window select Date as the Column Data Format

This will actually change the field to a date field, thus allowing SAS to read it in as expected. Richard Hockey email: mailto:rhockey@mater.org.au Senior Data Analyst Phone:+61 7 3840 1587 Queensland Council on Obstetric Fax:+61 7 3840 1588 and Paediatric Mortality and Morbidity Mater Hospital South Brisbane , QLD 4101 Australia URL: http://www.uq.net.au/qcopmm/

<<Richard L Hockey.vcf>>


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