|
On Tue, 5 Aug 2008 08:11:29 -0700, Xuhong <zhuxuhong2000@GMAIL.COM> wrote:
>Hello folks,
>
>Here I met a problem and hope some one could help me figure it out. I
>need to give reports in excel file, however I couldn't get the formats
>in my output file.
>
>For example, I need run the age report with ageband format. It is fine
>in SAS output window, however the output_1 dataset don't show the
>format. So, the final excel don't have the format.
>
>proc freq data=temp;
>tables age/missing out=output_1;
>format age ageband.;
>run;
>libname myxls "P:\summary.XLS" ;
>data myxls.age;
>set output_1;
>format age ageband.;
>run;
>libname myxls clear;
...
hi,
since you are already in the data step, why not just create a character type
variable that will replace the age variable? here is an example. hth.
cheers,
chang
proc format;
value ageband 11-13="11-13" 14-15="14-15" 16="sweet";
run;
libname e "d:\your dir\test.xls";
data e.ageband;
set sashelp.class;
ageband = put(age, ageband.);
drop age;
run;
libname e clear;
|