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 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 19 Sep 2005 08:40:53 -0700
Reply-To:     Jeff Morison <jmt_mtf@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jeff Morison <jmt_mtf@YAHOO.COM>
Subject:      Re: ODS to EXCEL Multiple Sheets
Comments: To: liuwensui@gmail.com
In-Reply-To:  <1115a2b00509190836175c3330@mail.gmail.com>
Content-Type: text/plain; charset=iso-8859-1

Wensui: Thanks for your reply, but I need to do it using ODS, the code I have puts all the tables one after the other in one worksheet, which is hard to seperate. I need seperate worksheets using ODS code.

Thanks, Jeff

--- Wensui Liu <liuwensui@gmail.com> wrote:

> Jeff, > > here is a piece of code about DDE and HTH. > > *********************************************************** > * A DEMO SHOWS HOW TO CREATE & OUTPUT A CHART IN SAS > * > * AND INSERT IT INTO EXCEL USING DDE * > * DATE: 03-AUG-2005 * > ***********************************************************; > > data one; > do x = 1 to 10; > y = x*x + rannor(123)*5; > output; > end; > run; > > filename plot 'C:\temp\plot.bmp'; > goptions reset = global gsfname = plot gsfmode = > replace cback = white > device = emf > xmax = 10 in hsize = 8.4 in ymax = 7 in vsize = 5.4 > in; > > symbol i = spline w = 2 c = blue cv = red h = 1 v = > dot; > > title height = 1.5 font = arial color = red box = 2 > 'A DEMO HOW TO EXPORT CHART FROM SAS AND PUT IT IN > EXCEL'; > > proc gplot data = one; > plot y * x; > run; > title; > quit; > > options noxwait noxsync; > x '"C:\Program Files\Microsoft > Office\Office11\excel.exe"'; > > filename cmd dde 'excel|system'; > filename label dde 'excel|sheet1!r1c1:r1c10'; > filename data dde 'excel|sheet1!r2c1:r100c10'; > > data _null_; > file cmd; > put '[file.close(false)]'; > put '[new(1)]'; > put '[error(false)]'; > put '[save.as("C:\temp\demo")]'; > put '[app.maximize()]'; > put '[workbook.insert(2)]'; > put '[insert.picture("C:\temp\plot.bmp", 1)]'; > run; > > data _null_; > set one; > file label notab; > put 'X' '09'x 'Y'; > file data notab; > put x 4.0 '09'x y 8.2; > run; > > > On 9/19/05, Jeff Morison <jmt_mtf@yahoo.com> wrote: > > > > I have the following PROC FREQ code, I need to > > create a seperate work sheet in EXCEL for each > tables > > statement output, is it possible?. How do it? > > > > TIA, > > Jeff > > > > ods listing close; > > ods html file="C:\Freqs.xls"; > > > > proc freq data=all; > > tables first_dose*first_prodname/list missing; > > tables current_dose*current_prodname/list missing; > > tables first*first_dose*first_prodname/list > missing; > > tables current*current_dose*current_prodname/list > > missing; > > > > tables > > > first_location*first_doc*first_dose*first_prodname/list > > missing; > > tables > > > current_location*current_doc*current_dose*current_prodname/list > > missing; > > run; > > > > ods html close; > > ods listing; > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam > protection around > > http://mail.yahoo.com > > > > > > -- > WenSui Liu > (http://statcompute.blogspot.com) > Senior Decision Support Analyst > Cincinnati Children Hospital Medical Center >

__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com


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