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
SAS Super FREQ
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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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