Date: Wed, 29 Nov 2000 09:55:38 -0800
Reply-To: "William W. Viergever" <wwvierg@IBM.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "William W. Viergever" <wwvierg@IBM.NET>
Subject: Re: it works in report,
now how do I create an excell spread sheet or dataset???
In-Reply-To: <sa24dce8.050@mail.health.state.mo.us>
Content-Type: text/plain; charset="us-ascii"; format=flowed
Hi Frank:
You've received a few suggestions (OUT=, ODS, etc.) but given what you
wrote below (about OUT=) sounds like you need to try something else.
I'm a big DATA _NULL_ / PUT kind of guy <vbg> so that would be my
preference (as someone else mentioned when discussing Proc Import/Export,
with _NULL_ / PUTS you get a heck of a lot more control).
If you're in a hurry (nagging boss or just lazy <g>) then maybe try the ODS
--> HTML thingie, and then open that in Excel.
Lastly, from the pre-ODS days, for the DATA _NULL_ / PUT challenged, you
might want to check out TABULATE instead of report, but choose appropriate
FORMCHAR values to kill the box/lines and instead use appropriate
delimiters (i.e., tabs) to control how it gets read into Excel (column-wise).
Again, my main advice is the _NULL_ / PUTs.
HTH
Later
At 10:39 AM 11/29/2000 -0600, Frank Schiffel wrote:
>tried out =
>
>on proc report.
>
>thing is, in excell (after a .csv file)
>
>is same as proc print
>
>var1 var2 var3
>var1 var2 var3
>
>what I want is
>
>var1 var2 var3
> var2 var3
>
>var1 var2 var3
> var3
> var3
>
>etc etc
>
>what is it is is a listing of procedures in hospitals grouped by areas in
>state and sub areas.
>
>so, I want a list that looks like
>
>appendectomy
>
>north east region
>
>kansas city var4 var5 var6 var 7
>Jackson not KC var4 var5 var6 var7
>
>
>prostatectomy
>
>southwest region
>
>kansas city var4 var5 var6 var7
>
>I can print that in proc report. but when I pull back out = into excell I get
>
>prostatectomy southwest Kansas city var4 etc
>prostatecomy southwest non Kansas city var4 etc.
>
>
>right now am doing the old, insert lines into excell, move column 1 in the
>inserted areas, then delete column1, do the same for column2. getting old.
>not to mention, hmm. carpal tunnel????
>
>reason we want this in excell is this is going to a printer / other non
>SAS user who works in Excell.
>
>thanks.
>
> >>> "Smith, Curtis, Mr, DCAA" <Curtis.Smith@dcaa.mil> 11/29/00 9:29:56 AM >>>
>Proc Report has an out= option to write the resulting rows and columns to
>another SAS data set. You can also use ODS to do the same. Once in a SAS
>data set, you can use a variety of methods to export to Excel. You can use
>the DDE method. You can use Proc Export, if you license SAS/Access for PC
>Formats. You can use a Data _null_ step with PUT statements to create a flat
>file that can be imported into Excel. From Excel you can use ODBC to read
>the SAS data set.
>
>-----Original Message-----
>From: Frank Schiffel [mailto:SchifF@MAIL.HEALTH.STATE.MO.US]
>Sent: Tuesday, November 28, 2000 3:48 PM
>To: SAS-L@LISTSERV.UGA.EDU
>Subject: it works in report, now how do I create an excell spread sheet
>or dataset???
>
>
>proc report;
>column procedur book sub hospital avgcases recomend num_docs;
>define procedur / group;
>define book / group;
>define sub / display;
>define hospital / display width = 8;
>define avgcases / display;
>define recomend / display width = 8;
>define num_docs / display;
>
>break after procedur / page;
>run;
>
>is the code I have. I want to put this into Excell so it can be manipulated
>and changed for publication.
>
>I'm stumped. tried proc print, but can't get an output data set from there.
>
>any help would be appreciated. might fax 10 types of currency if we had any
>penguins running around here....
>
>
>
>
>Frank Schiffel, Research Analyst III
>Bureau of Health Care Performance Monitoring
>Center for Health Information Management and Epidemiology
>PO Box 570
>Jefferson City, MO 65102-0570
>
>573 751-6279
----------------------------------------------------------------------------
William W. Viergever Voice : (916) 483-8398
Viergever & Associates Fax : (916) 486-1488
Sacramento, CA 95835 E-mail : wwvierg@ibm.net
----------------------------------------------------------------------------
|