Date: Sat, 16 Oct 2010 06:32:38 -0700
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: output excel
Content-Type: text/plain; charset=ISO-8859-1
Hannes,
Would just applying a simple format accomplish what you want? E.g.:
data out_data (drop=i);;
format date1 date2 date9.;
date1=today();
date2=date1-50;
do i=1 to 10;
date1=date1-1;
date2=date2-6;
output;
end;
run;
filename out dde
'excel|k:\art\[myworkbook.xls]data!R2C1:R11C2' notab ;
data _null_;
set out_data;
file out notab lrecl=500000;
put date1 mmddyy8. '09'x date2 mmddyy8. '09'x;
run;
Art
------------
On Oct 12, 10:18 am, H Engberg <hannesengb...@gmail.com> wrote:
> hi,
>
> the dates in my excel worksheet looks like sh*t, at least two
> different formats. In my SAS program they have date9. (DDMMMYYYY).
>
> Do any one know how to influence excel in order to force excel to
> display the dates as in my SAS dataset or at least with one format,
> and not several?
>
> thanks!
> Hannes
>
> code used in my program:
> ...
> filename out dde
> 'excel|L:\file[myworkbook.xls]data!R2C1:R5000C200' notab ;
> data _null_;
> set out_data;
> file out notab lrecl=500000;
> put date1 '09'x date2 '09'x;
> run;
|