Date: Thu, 5 Jul 2001 12:48:08 -0400
Reply-To: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Howard Schreier <Howard_Schreier@ITA.DOC.GOV>
Subject: Re: Antwort: newbie PROC IMPORT query
Content-Type: text/plain; charset=ISO-8859-1
I think a qualification is necessary regarding DDE. It is only as exact as
the displayed values in Excel. If a cell contains, for example, the value
1.23 but is displayed to one decimal place (1.2), DDE picks up the rounded
value and the resulting SAS variable will get the value 1.20.
On Thu, 5 Jul 2001 17:15:50 +0100, Peter Crawford <peter.crawford@DB.COM>
wrote:
>the best suggestion may not be the simplest
>
>simplest =proc import and you have discovered how (d)effective that is
>
>dde = more programming and learning curve and not flexible but _exact_
>
>sql server 2000+ sas/access to odbc = sophisticated and flexible.... but
...
>... see recent postings by Xlr82sas on "Proc Export to Excel file with
multiple sheets"
>
>
>
>
>
>Datum: 05/07/2001 15:28
>An: SAS-L@listserv.uga.edu
>
>
>
>
>Antwort an: evan.cooch@NOSPAMCORNELL.EDU
>
>Betreff: newbie PROC IMPORT query
>Nachrichtentext:
>
>Although I've been using SAS for ~20 years, I'm actually using PROC
>IMPORT for the first time, because someone I'm working with insists on
>using Excel to mange his data.
>
>After trying a variety of options to output from Excel into a nice
>flat ASCII white-spaced delimted file, I gave up, and tried PROC
>IMPORT.
>
>Seems to do the trick with one huge caveat. Based on what I can
>determine, PROC IMPORT is naive and stupid about the way it
>differentiates (or, rather fails to) between string and numeric
>variables.
>
>if I have a column in the Excel spreadsheet that is a mixture of
>numeric and string data 9for example, a 1 if the event was seen, a 0
>if it wasn't, and a 'U' if its unknown), then IF the first element of
>the coumn is a string, then IMPORT assumes that ALL the variables in
>the column are string, and completely leaves out all the true numeric
>data (reporting them as blank). Alternatively, if the first element of
>a column happens to be a number, then it does the reverse - IMPORT
>reads in the numeric cells fine, but leaves the cells containing
>string variables as blanks.
>
>Any suggestions? I'd rather not have to write some stupid Excel macro
>to do type conversions if I don't have to - are there options in PROC
>IMPORT that aren't in the online documentation which allow me to get
>around this odious step?
>
>Thanks!
>
>
>
>
>
>--
>
>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.
>
>This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
|