BookmarkSubscribeRSS Feed
steve_citi
Calcite | Level 5
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?
3 REPLIES 3
Cynthia_sas
Diamond | Level 26
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
steve_citi
Calcite | Level 5
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.
Cynthia_sas
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1275 views
  • 0 likes
  • 2 in conversation