Hi all, I'm trying to colorize the grouped headers in my tagset.ExcelXP report, I know ho to colorize the headers of the ungrouped columns but do not know how to change the background color of the grouped ones. This is the sample code I'm using: data work.db;
infile datalines delimiter=';' dsd flowover;
input col01 col02 col03 col04 col05;
datalines4;
1;2;3;4;5
6;7;8;9;10
11;12;13;14;15
;;;;
run;
ods tagsets.ExcelXP file="c:\temp\example.xls";
proc report data=work.db nowd missing nocenter;
column
("group 1" col01 col02 col03 )
("group 2" col04 col05 )
;
define col01 / display style(header)={background=cxFFC000};
define col02 / display style(header)={background=cxFFC000};
define col03 / display style(header)={background=cxFFC000};
define col04 / display style(header)={background=cxC0FF00};
define col05 / display style(header)={background=cxC0FF00};
run;
ods tagsets.ExcelXP close; When I run this code I obtain this result: And below what I'm trying to obtain: How I had to modify my code to define the background color of the grouped cell "group 1" and "group 2"? I tried with "inline formatting" but got no result (you can see my modified version of the code below) ods escapechar = '^';
ods tagsets.ExcelXP file=" c:\temp\ example.xls"; proc report data=work.db nowd missing nocenter style={protectspecialchars=off}; column ("^{style[background=cxFF0000]}group 1" col01 col02 col03 ) ("group 2" col04 col05 ) ; define col01 / display style(header)={background=cxFFC000}; define col02 / display style(header)={background=cxFFC000}; define col03 / display style(header)={background=cxFFC000}; define col04 / display style(header)={background=cxC0FF00}; define col05 / display style(header)={background=cxC0FF00}; run; ods tagsets.ExcelXP close; Surely I'm missing something but I cannot "see" what I'm missing 🙂 Someone can help or give me a suggestion? Thanks in advance Costantino
... View more