I would like to get an excel output working so that different across values are colored individually. I have attached an sample code on which I would like to color the var1 and var2 headers. I tried to follow Cynthia's instructions but couldn't get it working for some reason.
%let outputurl=;
proc format;
value $color "var1"='Gray'
"var2"='Yellow';
run;
data reportdata;
col1="var1";
col2="by1";
col3=1;
output;
col1="var1";
col2="by2";
col3=3;
output;
col1="var2";
col2="by1";
col3=9;
output;
col1="var2";
col2="by2";
col3=4;
output;
run;
data reportdata;
set reportdata;
dummy=1;
run;
/*options device=ACTXIMG;*/
/*ods excel file="&outputurl..xlsx"*/
/* options(sheet_interval="none" frozen_headers='2' frozen_rowheaders='1' gridlines='ON' */
/*orientattion='LANDSCAPE' suppress_bylines='ON' SHEET_NAME='Sheet1' autofilter='ALL');*/
proc report data=reportdata out=test;
col col1,(col2,col3) dummy;
define col1/across '' style(header)=Header{background=$color.};
define col2 /across '';
define col3/ '' nozero;
define dummy/noprint group;
run;
/*ods excel close;*/
... View more