Date: Tue, 15 Apr 2003 17:47:50 +0100
Reply-To: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: SAS User <sasuser@GUILDENSTERN.DYNDNS.ORG>
Subject: Re: Changing columns order ?
In-Reply-To: <002601c30350$c73df7e0$0bcba8c0@iimahd.ernet.in>
Content-Type: text/plain; charset=us-ascii
on Tue, Apr 15, 2003 at 06:43:12PM +0530, Vivek Gupta (vgupta@IIMAHD.ERNET.IN) wrote:
> I have slowly graduated to using SAS from excel. Still I often output SAS
> data to excel and use some excel features for improving data presentability
> in power point presentations. This is also helpful if I am helping someone
> to do data analysis on SAS and later use the results in excel.
>
> I often face similar problem of column ordering. Is there any way to do that
> while exporting the data.
There are many ways to accomplish this.
If the objective is to avoid rewriting the data, you can construct an
SQL or DATA step view, which specifies column order. E.g.:
data arthur; retain i e u a o 1; run;
proc sql;
create view ford as
select a, e, i, o, u
from arthur
;
quit;
proc print data= arthur; run;
proc print data= ford; run;
Shows an unordered, and an alpha-ordered selection of variables from
'arthur' and 'ford'. The view itself takes very little time to resolve,
even for large datasets, and next to no storage (only what's required
for the view descriptor itself).
--
Charming man. I wish I had a daughter so I could forbid her to marry one...