Date: Fri, 20 Mar 2009 10:26:54 -0500
Reply-To: Mary <mlhoward@avalon.net>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: Creating Excel Pivot Tables from SAS
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=original
Smita,
Generally, proc tabulate or proc report is used to produce tables that
resemble Excel Pivot Tables. If you would create a sample data set
of what your data looks like and explain what you want your row dimension,
column dimension and what you want as summary variables, then we
could show you the equivalent code in proc tabulate to get a similar table.
Here is an example of proc tabulate:
proc tabulate data=test noseps formchar(1 6 7 8)=' ';
class disease_flag &variable_names smoker;
table all &variable_names, disease_flag=''*(N*f=6.0 PCTN<all
&variable_names>*F=7.2)
smoker*disease_flag=''*(N*f=6.0 PCTN<all &variable_names>*F=7.2)
smoker=''*(N*f=6.0) all='Total'*(N*f=6.0)
/ RTS=20 MISSTEXT=' ' BOX={label='VARIABLE'} ROW=FLOAT;
keylabel n='n' pctn='%';
run;
-Mary
----- Original Message -----
From: Smita Sumant
To: SAS-L@LISTSERV.UGA.EDU
Sent: Friday, March 20, 2009 10:02 AM
Subject: Creating Excel Pivot Tables from SAS
hi
Can anyone help me create EXcel Pivot table using SAS? i tried tableeditor
tagset; howvere it has limitations on no of records in data.
Smita
|