The SAS Output Delivery System and reporting techniques

Excel background

Reply
Contributor
Posts: 39

Excel background

The background colors of the cells below and to the right of my table are the same color as my header. I've never seen this before. Does anyone know how to fix this?
SAS Super FREQ
Posts: 8,743

Re: Excel background

Hi:
I'm not sure what you want to fix. For example, if I run this code:
[pre]
ods tagsets.excelxp file='testcolor.xml' style=sasweb;
proc tabulate data=sashelp.class;
title '1) TABULATE Defaults';
class sex age;
var height;
table sex*age all,
height*(min mean max);
run;

proc report data=sashelp.class nowd;
title '2) REPORT defaults';
column sex age height,(min mean max);
define sex / group;
define age / group;
define height/ 'Height';
rbreak after / summarize;
run;

proc tabulate data=sashelp.class;
title '3) Change TABULATE';
class sex age;
classlev sex age / style=Data;
var height;
table sex*age all,
height*(min mean max);
keyword all / style=Data;
run;

ods tagsets.excelxp close;
[/pre]

In Report #1, you see TABULATE's default behavior without any style= overrides. The COLUMN headers for HEIGHT, MIN, MEAN and MAX are all blue background and white foreground. SEX, AGE and ALL have the same attributes as the Header cells (blue background, white foreground) in Report #1. That's because with TABULATE, these row headers and class levels are styled with the RowHeader element from the style template.

Compare this default behavior to the report and style usage that you have with PROC REPORT's default behavior in report #2...the SEX and AGE related information is the same style as the DATA cells. Different procedures, different treatment. Only the column headers in PROC REPORT are blue background and white foreground.

Report #3 shows how to apply an override to the CLASSLEV in TABULATE for SEX and AGE to make those cells look like the DATA cells. In addition, the KEYWORD statement applies a change to the ALL cell so it is styled the same as a DATA cell.

cynthia
Contributor
Posts: 39

Re: Excel background

thanks for your response. The problem is actually not IN the tables, it's the area outside of the tables. Somehow it has picked up the same background color as the headers.

Even more strange, it seems to come and go.
SAS Super FREQ
Posts: 8,743

Re: Excel background

Hi:
As you say, very strange. I have not observed anything like that when I use TAGSETS.EXCELXP. You might want to work with Tech Support on this one.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 107 views
  • 0 likes
  • 2 in conversation