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 (August 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Aug 2006 22:34:55 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: Output to Excel

On Thu, 17 Aug 2006 08:43:32 -0400, Heman Hunters <hemanhunters@GMAIL.COM> wrote:

>I know this has been discussed before, and I browsed some previous threads >but didn't find exactly what i was looking for. > >I want to output a data set to Excel. But I would like it to be output as >a matrix, like the kind you get in the output window when using proc freq.

So use PROC FREQ but route the output to the HTML destination and use ".XLS" as the filename extension. That trick has been presented here countless times.

I think this is about the third post in the last week or so where somebody was seeking a way to have a table rearranged or enhanced in some way in the course of exporting it to Excel. That's not realistic. What makes sense is to put the export-to-Excel part of the task aside and figure out how to get what you need on the SAS side. Then the export part is simple.

> >I have managed to output the underlying dataset to Excel, but then it >looks like this: > >Group Job Sum Freq >----- --- ------ ---- > 1 A 1001 17 > 1 B 952 16 > 1 C 1009 5 > 2 A 5049 118 > 2 C 7644 466 > 3 A 899 14 > 3 B 79 2 > >Now I don't want to have to "create" the example matrix below in Excel >everytime I run this program. Any suggestions? (The matrix and the >underlying data can change from time to time, so just outputing the raw >data to one spreadsheet and setting references to it (=P5, etc.) won't >work.) > >Thanks!! > > | A B C >---|--------------------------------------- > 1 | 17 16 5 > | > 2 | 118 - 466 > | > 3 | 14 2 - > |


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