Below is a test program that creates different styles 'border1' and 'border2' and then writes output using PROC TABULATE to an ODS HTML destination. In the ODS HTML statement, I can specify style=borders1 or style=borders2 and verify the table looks different. What if I want two tables in the same ODS HTML output, one in one style and one in the other? Is there a way to switch styles after the first table? Or a way to change the ODS HTML specification, but have the second output appended to the first instead of overwriting it? ________________________________________ %let progname = %sysfunc(scan( %sysfunc(scan(%sysFunc( compress(&sysProcessName,%str(%")) ), -1, '\')), 1, '.')); %let dirname = %sysfunc(scan( %sysfunc(scan(%sysFunc( compress(&sysProcessName,%str(%")) ), -2, '\')), 1, '.')); proc template; define style borders1; parent=styles.default; style Table from Output / cellspacing=0 cellpadding=8pt frame=void RULES=all borderwidth=1 borderspacing=0 bordercollapse=collapse bordercolor=GRAYBB ; style Header from HeadersAndFooters / /* Blend headers */ background=color_list('bgA'); style Data From Data / /* Blend data background */ background=color_list('bgA') ; end; define style borders2; parent=styles.default; style Table from Output / cellspacing=0 cellpadding=24pt frame=void RULES=all borderwidth=1 borderspacing=0 bordercollapse=collapse bordercolor=RED ; style Header from HeadersAndFooters / /* Blend headers */ background=color_list('bgA'); style Data From Data / /* Blend data background */ background=color_list('bgA') ; end; run; ods html file="&progname..htm" (title="&progname") style=borders2 ; options nocenter; title1 "%bquote(%sysfunc(getoption(sysin)) - &sysday &sysdate &systime )"; data a; do y = 1 to 3; do x = 1 to 5; z +1; output; end; end; run; proc tabulate data=a format=best.; class x y; var z; table sum*z, y, x; run; /* TEMPLATE Procedure: Creating a Style Template Detailed Information for All Style Attributes http://support.sas.com/documentation/cdl/en/odsug/65308/HTML/default/viewer.htm#n19a4b40swc766n18qczor47r08f.htm#p08kxrmor86zngn1nhob1wgnz5a4 */
... View more