Proc template background color of header doesn't work

Reply
New Contributor
Posts: 4

Proc template background color of header doesn't work

I was trying to create a style by using proc template. however, when I apply the style to my output(excel file). The background color of header doesn't change as I defined below. Could anyone help to take a look why the background color of header of doesn't work?

Another thing, I need to give different background colors to the column headers in the same table. Anyone had experience on it?

proc template;

define style mystyle;

class body /
backgroundcolor = white
color = black
fontfamily = "Palatino"
;
class systemtitle /
fontfamily = "Verdana, Arial"
fontsize = 10pt
fontweight = bold
;

class table /
backgroundcolor = white
bordercolor = black
borderstyle = solid
borderwidth = 1pt
cellpadding = 5pt
cellspacing = 0pt
fontsize = 10pt
frame = void
rules = groups
just=center
;

class header /
background = lightgreen

foreground = blue
;

class data /
fontfamily = "Palatino"

;
end;

ODS htmlcss file = "&out..rtf" style=mystyle ;

........

Super User
Super User
Posts: 7,401

Re: Proc template background color of header doesn't work

Why not use the tagsets.execlxp if you want to output to Excel:

ods tagsets.excelxp file "xyz.xls" style=mystyle

     options (frozen_headers="1" absolute_column_width="none" zoom="80");

ods tagsets.excelxp options (sheet_name="Header");

proc report data = work.xyz nowd split="~";

run;

ods tagsets.excelxp close;

New Contributor
Posts: 4

Re: Proc template background color of header doesn't work

Sorry for the late reply! Thank you RW9! After I used excelxp tagset, the program works fine now:-)

Ask a Question
Discussion stats
  • 2 replies
  • 194 views
  • 3 likes
  • 2 in conversation