SAS OnlineTutorback||next

Try It! Using the Clinic.Admit data set, apply styles to heading cells.

Creating HTML output? Read this first.

  1. Copy the following program and paste it into the Program Editor window (or issue the command copy sashelp.oltutor..source).
    ods listing close;
    ods html path='?' body='?';
    proc tabulate data=clinic.admit 
         format=4.1;
       var age;
       class sex actlevel;
       table sex*actlevel*age,mean;
    run;
    ods html close;
    ods listing;
    
    
  2. Replace the question marks (?) with PATH= and BODY= values that conform to your system's file structure. Remember that you can use the URL= suboption in PATH=, BODY=, or both.

  3. Submit the program and view the HTML table in your browser.

  4. Recall the program.

  5. Add the STYLE= option to the program's CLASS statement to change the background color of the Sex and ActLevel headings. Remember to add a slash (/) before the option.

  6. Insert a KEYWORD statement to change the background color of the Mean statistic. Remember to add a slash before the STYLE= option.

  7. Add the BOX= option to the TABLE statement to change the background color of the upper-left cell. Remember to add a slash before the BOX= option and to enclose the entire STYLE= option in braces.

  8. Submit the program and view the table in your browser. Check for any problems in the SAS log.

  9. Recall the program in the Program Editor window, change its color values, and re-submit the program.

  10. View the results in your browser.

    Return here and select Next.

Solution
back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA.
All rights reserved.

Terms of Use & Legal Information | Privacy Statement