Date: Tue, 2 Oct 2001 09:26:52 -0400
Reply-To: "Brucken, Nancy" <Nancy.Brucken@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Brucken, Nancy" <Nancy.Brucken@PFIZER.COM>
Subject: Re: Outputting to Formatted Excel Workbook
Content-Type: text/plain; charset="iso-8859-1"
Hi Steve,
I saw one recommendation already to use DDE to handle your formatting
requirements, and would agree with that- it gives you the most amount of
flexibility and control. Of course, it also requires more programming than
other methods, such as outputting CSV or HTML files, but you get what you
pay for.
Using DDE, you can either send Excel 4 macro commands (documented at
http://www.microsoft.com/downloads/release.asp?ReleaseID=12917), or
keystroke-record (or write) VBA macros in Excel to do the formatting, and
then just call those macros as Richard suggested. We've done the latter (at
the time we started developing our system, we hadn't been able to find any
Excel 4 documentation, and VBA macros are easy to record). I can send
samples of a couple of the formatting macros we've developed, if there are
specific things you want to try and do (set fonts, column widths, etc.).
Hope this helps,
Nancy
Nancy Brucken
Clinical/Regulatory Informatics
Pfizer Global Research & Development, Ann Arbor
(734) 622-5767
E-mail address: Nancy.Brucken@pfizer.com
-----Original Message-----
From: Steve Patterson [mailto:SPatterson@ACCORDANT.NET]
Sent: Tuesday, October 02, 2001 8:16 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Outputting to Formatted Excel Workbook
I've written sascode to generate periodic reports (basically rosters of data
queried from a larger data set), but am having trouble writing the code to
output the data into a print ready, formatted Excel workbook file with
multiple worksheets. i.e. how to set margins, column width and default the
page to landscape. Any suggestions on processes or methods to use? Thanks.
Steve Patterson
Medical Economics
336.315.3758 Ph/Fax
Visit our patient communities at http:\\www.accordant.com or our corporate
site at http:\\accordant.net
"A knot tied by a wise man cannot be undone by a fool."
|