data have;
infile datalines truncover dlm=',' dsd;
input catX $ catY $ value $ ALFA $;
datalines;
X1,Y1,2,A
X1,Y1,4,D
X1,Y2,1,G
X1,Y2,3,H
X2,Y1,2,K
X2,Y2,2,H
X2,Y2,3,Y
X2,Y2,3,G
X1,Y3,2,A
X1,Y3,4,D
X1,Y4,2,A
X1,Y4,4,D
X2,Y4,2,A
X2,Y4,4,D
;
ods excel file='c:\temp\want.xlsx';
proc report data=have nowd style={cellwidth=2cm};
column catY catX value ALFA;
define catY/order noprint;
define catX / order noprint;
define value/display 'A' style={just=r};
define ALFA / 'B' ;
Compute before catX/style={just=l};
Line catX $50.;
endcomp;
Compute before catY/style={just=l};
Line catY $50. ;
endcomp;
run;
ods excel close;
... View more