Examples from the Gallery of ODS Samples
EPUB Output
ods html close;
data drugtest;
input Drug $ PreTreatment PostTreatment @@;
datalines;
A 11 6 A 8 0 A 5 2 A 14 8 A 19 11
A 6 4 A 10 13 A 6 1 A 11 8 A 3 0
D 6 0 D 6 2 D 7 3 D 8 1 D 18 18
D 8 4 D 19 14 D 8 9 D 5 1 D 15 9
F 16 13 F 13 10 F 11 18 F 9 5 F 21 23
F 16 12 F 12 5 F 12 16 F 7 1 F 12 20
;
ods epub file="glm.epub" title="My First ODS EPUB E-book"
options(creator="SAS Programmer" description="My First ODS EPUB Book"
subject="PROC GLM" type="ODS EPUB book");
ods graphics on;
proc glm data=DrugTest;
class Drug;
model PostTreatment = Drug|PreTreatment;
run;
quit;
ods epub close;
Excel Output
ods html close;
title "Custom Excel Output";
proc sort data=sashelp.cars out=cars;
by make;
run;
ods tagsets.excelxp file="bylines.xls" style=htmlBlue
options( suppress_bylines='yes' Embedded_Titles="yes"
Sheet_Label="By" Frozen_Headers="yes");
proc print data=cars;
var make model msrp invoice;
by make;
run;
ods tagsets.excelxp close;
HTML Output
options nocenter;
ods html style=barrettsblue;
1056 Appendix 2 Example Programs

Get SAS 9.4 Output Delivery System, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.