From: pigpigpig on
I have a sas table as below:

ID CLASS
111 A
111 B
111 C
222 AA
222 BB
222 CC
222 DD

I would like to use ODS output the results to excel, and it looks
like:

ID CLASS
111 A
B
C
-------------------
222 AA
BB
CC
DD

I don't know how to add a border between two IDs.
Can anyone please help? Much appreciated!
From: Tom Abernathy on
What have you tried?
I am not sure what you mean by a "border".
Did you try just using PROC PRINT with a BY and ID statements?

proc print;
by id ;
id id;
var class;
run;


On Jan 4, 9:58 am, pigpigpig <pigzhu...(a)gmail.com> wrote:
> I have a sas table as below:
>
> ID      CLASS
> 111     A
> 111     B
> 111     C
> 222    AA
> 222    BB
> 222    CC
> 222    DD
>
> I would like to use ODS output the results to excel,  and  it looks
> like:
>
> ID     CLASS
> 111   A
>         B
>         C
> -------------------
> 222  AA
>        BB
>        CC
>        DD
>
> I don't know how to add a border between two IDs.
> Can anyone please help? Much appreciated!

From: pigpigpig on
On Jan 4, 12:20 pm, Tom Abernathy <tom.aberna...(a)gmail.com> wrote:
> What have you tried?
> I am not sure what you mean by a "border".
> Did you try just using PROC PRINT with a BY and ID statements?
>
> proc print;
>   by id ;
>   id id;
>   var class;
> run;
>
> On Jan 4, 9:58 am, pigpigpig <pigzhu...(a)gmail.com> wrote:
>
>
>
> > I have a sas table as below:
>
> > ID      CLASS
> > 111     A
> > 111     B
> > 111     C
> > 222    AA
> > 222    BB
> > 222    CC
> > 222    DD
>
> > I would like to use ODS output the results to excel,  and  it looks
> > like:
>
> > ID     CLASS
> > 111   A
> >         B
> >         C
> > -------------------
> > 222  AA
> >        BB
> >        CC
> >        DD
>
> > I don't know how to add a border between two IDs.
> > Can anyone please help? Much appreciated!- Hide quoted text -
>
> - Show quoted text -

Hi Tom, Thank you for your answer. It works