Created
March 17, 2014 16:45
-
-
Save statgeek/9603140 to your computer and use it in GitHub Desktop.
SAS - RTF Style for tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*This program is a template for a tight table style for Word Documents, | |
RTF. | |
Originally written by Ryan Woods, BC Cancer Agency*/ | |
proc template; | |
define style styles.newrtf; | |
parent=styles.rtf; | |
style header / background = white font=(Times, 11pt, Bold); | |
replace fonts / | |
'TitleFont2' = ("Times",12pt,Bold Italic) | |
'TitleFont' = ("Times",12pt,Bold) | |
'StrongFont' = ("Times",11pt,Bold) | |
'EmphasisFont' = ("Times",11pt,Italic) | |
'FixedEmphasisFont' = ("Courier New, Courier",10pt,Italic) | |
'FixedStrongFont' = ("Courier New, Courier",10pt,Bold) | |
'FixedHeadingFont' = ("Courier New, Courier",10pt,Bold) | |
'BatchFixedFont' = ("SAS Monospace, Courier New, Courier",8pt) | |
'FixedFont' = ("Courier New, Courier",10pt) | |
'headingEmphasisFont' = ("Times",12pt,Bold Italic) | |
'headingFont' = ("Times",11pt,Bold) | |
'docFont' = ("Times",9pt); | |
replace Table from Output / | |
rules = all | |
cellspacing = 0.5pt | |
cellpadding = 2.0pt; | |
end; | |
run; | |
ods listing close; | |
ods rtf file="C:\temp\sample_rtf.rtf" style=styles.newrtf; | |
proc report nowd data= sashelp.class spanrows; | |
column sex name ('Measurements' age height weight); | |
define sex /'Sex' order; | |
define name / 'Name'order; | |
define age/ 'Age' order; | |
define height/ 'Height' format=8.1; | |
define weight/ 'Weight' format=8.1; | |
run; | |
ods rtf close; | |
ods listing; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment