24.6 - Changing the Appearance of Your Output

I have good news and bad news for you about changing the appearance of your output. The good news is that if you had enough time to learn all of the ways in which you could change the appearance of your SAS output, you could create just about anything you wanted. The bad news is that we don't have enough time in this course to explore all of the possibilities. In fact, we'll barely nibble the surface. In this section, we will only investigate how to use the ODS HTML statement's STYLE= option to change the appearance of the default HTML output by using one of the many predefined style templates built into SAS.

Example 24.9 Section

The following program uses the ODS HTML statement's STYLE= option to tell SAS to use the meadow style when displaying the HTML output created by printing a subset of the stat481.penngolf data set:

ODS HTML file = 'C:\yourdrivename\Stat481WC\12ods\output\golf9.html'
        style = meadow;
 
PROC PRINT data = stat481.penngolf NOOBS;
title 'Some of the penngolf data set variables';
ID name;
var year type par yards;
RUN;
 
ODS HTML CLOSE;

 

Some of the penngolf data set variables
NameYearTypeParYards
Toftrees1968Resort727018
Penn State Blue1921Public726525
Centre Hills1921Private716392
Lewistown CC.Private726779
State College Elks1973SemiPri716369
Park Hills CC1966SemiPri706004
Sinking Valley CC1967SemiPri726755
Williamsport CC1909Private716489
Standing Stone GC1973SemiPri706593
Bucknell GC1960SemiPri706253
Mount Airy Lodge1972Resort727123


 

As you can see, telling SAS what style to use is as simple as adding the STYLE= option to the ODS HTML statement. Launch and run  the SAS program, and review the output to see the appearance of the HTML output when created using the meadow style template.

Example 24.10 Section

Of course you are asking yourself "how would I know that meadow is one of the available predefined styles?" Fortunately, the answer is simple enough. The following TEMPLATE procedure produces a list of the predefined style templates that are available on your system:

PROC TEMPLATE;
    LIST STYLES;
RUN;

The SAS System
Listing of: SASHELP.TMPLMST
Path Filter is: Styles
Sort by: PATH/ASCENDING
ObsPathType
1StylesDir
2Styles.AnalysisStyle
3Styles.BarrettsBlueStyle
4Styles.DTreeStyle
5Styles.DaisyStyle
6Styles.DefaultStyle
7Styles.DoveStyle
8Styles.EGDefaultStyle
9Styles.ExcelStyle
10Styles.FancyPrinterStyle
11Styles.FestivalStyle
12Styles.FestivalPrinterStyle
13Styles.GanttStyle
14Styles.GrayscalePrinterStyle
15Styles.HTMLBlueStyle
16Styles.HTMLEncoreStyle
17Styles.HarvestStyle
18Styles.HighContrastStyle
19Styles.HighContrastLargeStyle
20Styles.JournalStyle
21Styles.Journal1aStyle
22Styles.Journal2Style
23Styles.Journal2aStyle
24Styles.Journal3Style
25Styles.Journal3aStyle
26Styles.ListingStyle
27Styles.MeadowStyle
28Styles.MeadowPrinterStyle
29Styles.MinimalStyle
30Styles.MonochromePrinterStyle
31Styles.MonospaceStyle
32Styles.MoonflowerStyle
33Styles.NetdrawStyle
34Styles.NoFontDefaultStyle
35Styles.NormalStyle
36Styles.NormalPrinterStyle
37Styles.OceanStyle
38Styles.PearlStyle
39Styles.PearlJStyle
40Styles.PlateauStyle
41Styles.PowerPointDarkStyle
42Styles.PowerPointLightStyle
43Styles.PrinterStyle
44Styles.RavenStyle
45Styles.RtfStyle
46Styles.SapphireStyle
47Styles.SasDocPrinterStyle
48Styles.SasWebStyle
49Styles.SeasideStyle
50Styles.SeasidePrinterStyle
51Styles.SnowStyle
52Styles.StatDocStyle
53Styles.StatisticalStyle
54Styles.vaDarkStyle
55Styles.vaHighContrastStyle
56Styles.vaLightStyle

Launch and run  the SAS code, and review the output to see the list of predefined styles that are shipped with SAS. You might want to try some of the styles out yourself. While I do find some of the styles rather nice, I personally find some of them rather hideous (and therefore useless to me).