Date: Wed, 2 Jun 1999 08:58:48 -0400
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Gary McQuown <gary.mcquown@US.PWCGLOBAL.COM>
Subject: Re: Importing spreadsheets/workbooks from excel into SAS
Content-type: text/plain; charset=us-ascii
"Simple" is such a relative term. The following code is about as simple as
it gets while
making sure the data is read correctly. Choosing the correct options and
very important. You can determine the correct DDE triplet by opening SAS,
Excel, copying the area in question in Excel and then choosing "options"
Triplet" from the SAS menu. The correct triplet will appear in the box.
For more information, check out the following site for more examples.
/* Snip of Code */
/* Worksheet name: Courier PU Schedule
Workbook name: Sargtemp.xls
/* opens Excel workbook */
/* SAS waits until Excel is open */
/*Opens sheet 3, Courier PU Schedule*/
filename in3 dde 'excel|Courier PU Schedule!R4C1:R53C4' ;
/* Use informats and correct options to read data */
data ref3 ;
infile in3 dlm='09'x notab dsd missover;
kit $char3. /* kit */
weekday $char10. /* day of week */
puptime time8. /* couier pick up time */
ASG Contractor @
Peter Baade <Peter_Baade@HEALTH.QLD.GOV.AU> on 06/01/99 11:23:59 PM
Please respond to Peter Baade <Peter_Baade@HEALTH.QLD.GOV.AU>
Subject: Importing spreadsheets/workbooks from excel into SAS
Is there a "simple" way of importing data from an EXCEL97 workbook (with
multiple worksheets) in SAS (using SAS 6.12 on Windows95)?
I am trying to use the DDE syntax, but can only find very limited
documentation about its use.
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any