Chapter Contents

Previous

Next
The TABULATE Procedure

Example 14: Specifying Style Elements for HTML Output


Procedure features:
STYLE= option in
PROC TABULATE statement
CLASSLEV statement
KEYWORD statement
TABLE statement
VAR statement
Other features: ODS HTML statement
Data set: ENERGY
Formats: REGFMT, DIVFMT, and USETYPE

This example creates HTML files and specifies style elements for various table regions.


Program
 Note about code
ods html body='external-file';
 Note about code
proc tabulate data=energy style=[font_weight=bold];


 Note about code
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      class region division type / style=[just=center];


 Note about code
   classlev region division type / style=[just=left];


 Note about code
   var expenditures / style=[font_size=3];
 Note about code
   keyword all sum / style=[font_width=wide];
   keylabel all="Total";
 Note about code
   table (region all)*(division all*[style=[background=yellow]]),
         (type all)*(expenditures*f=dollar10.) / 
         style=[background=red]
        
 Note about code
         misstext=[label="Missing" style=[font_weight=light]]
         
 Note about code
         box=[label="Region by Division by Type" 
         style=[font_style=italic]];

 Note about code
   format region regfmt. division divfmt. type usetype.;
   title 'Energy Expenditures';
   title2 '(millions of dollars)';
run;
 Note about code
ods html close;


HTML Body File
 Note about figure

[IMAGE]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.