| Date: | Tue, 20 Oct 1998 16:56:44 -0400 |
| Reply-To: | "Brucken, Nancy" <Nancy.Brucken@WL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | "Brucken, Nancy" <Nancy.Brucken@WL.COM> |
| Subject: | Re: Writing EXCEL Files In SAS |
|
| Content-Type: | text/plain |
|---|
Hi Joe,
There are a couple of different ways to create Excel spreadsheets
from SAS. If you're just dumping data and don't care what it looks
like, you can use PROC DBLOAD (part of SAS/ACCESS)- this takes the
contents of a dataset, optionally puts labels on the first line, and
then populates the rest of the spreadsheet with the values. Quick, but
not acceptable if the output has to look "pretty".
Another approach is to use Dynamic Data Exchange (DDE). To do
this, you set up a DDE link between SAS and Excel, and then use the SAS
PUT statement to dump the data into Excel. You have all of the
functionality of the DATA step to control where and how to place the
output, and can also call Excel macros from SAS to do such things as
open the workbook to the correct worksheet, format cells, copy and paste
ranges, etc. We've been using that method, and you can do quite a bit
with it, though the programming can get a bit detailed. There is some
information on Excel and DDE out on the SAS Tech Support web page, and
there was a very good article in the 2Q96 issue of Observations (prior
to the online version)
Finally, I think you can accomplish the same thing using OLE, but
I'm still researching that method- if you're not familiar with Windows
API calls (which I am definitely not!), it doesn't look too
straightforward.
Hope this helps. If you have any questions, please ask.
Nancy
Nancy Brucken
Parke-Davis, QIP
(734) 622-5767
Internet address: Nancy.Brucken@wl.com
> -----Original Message-----
> From: Joe CarpenterATZ [SMTP:jcarpent@ZOO.UVM.EDU]
> Sent: Tuesday, October 20, 1998 4:50 PM
> To: SAS-L@UGA.CC.UGA.EDU
> Subject: Writing EXCEL Files In SAS
>
> I would appreciate any info on/examples of writing EXCEL
> spreadsheets from SAS. Thanks very much.
>
> Joe Carpenter
> Statistician/Programmer, Vermont-Oxford Network
> (802) 865-4814 email: jcarpent@zoo.uvm.edu
|