BookmarkSubscribeRSS Feed
Cynthia_sas
Diamond | Level 26
Hi:
About #2...the only way I know to get the empty cells above region or product formatted is to set the default for ALL the headers to the color you want those cells (black/white) and then override all the other headers in DEFINE statements to be the other colors you want.

cynthia
[pre]
ods listing close;
ods tagsets.ExcelXp file='header_ques.xls' style=sasweb
options(embedded_titles='yes' sheet_name='Business Unit HA' absolute_column_width='9');
title 'make ALL headers white and black and then override the ones you want different';
proc report data=sashelp.shoes nowd
style(headers)={foreground=black background=white font_weight=bold};
where product in ('Boot', 'Sandal', 'Slipper');
column region product, ( sales inventory returns);
define region / group;
define product / across style(header)={foreground=white background=green};
define returns/ sum ;
define inventory / sum style(header)={foreground=black background=cyan};
define sales / sum style(header)={foreground=black background=cyan};
run;
ods _all_ close;[/pre]

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 15 replies
  • 4100 views
  • 0 likes
  • 2 in conversation