Changing PROC TABULATE Row Style Attributes

To change the style attributes of a row heading in a PROC TABULATE table, you can use a STYLE= option in the CLASS or VAR statements that build the heading. To change the style attributes of an entire row, you use a different technique. This example shows how to create rows of alternating colors.

The first thing you need to do is set up a format that contains the colors you want to use for each value. In this case, we want the first and third row to be one shade of gray and the third row to be a different shade of gray. The following PROC FORMAT code creates a SAS format that can assign a color to each value of the variable TYPE:

proc format; value $typecol 'Dining'='cxBBBBBB' other='cxDDDDDD'; run; ...

Get Output Delivery System: The Basics and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.