Sample 36907: Convert an existing CSS file to a comparable PROC TEMPLATE style definition
Styles used to format output generated with ODS use either template definitions created with PROC TEMPLATE or cascading style sheet (CSS) files. The TEMPLATE procedure compiles the code into a binary item store which can be used with any of the ODS destinations that allow formatting. Prior to SAS® 9.2, CSS files could only be used with Markup language files such as HTML.
The TEMPLATE procedure introduced the new IMPORT statement in SAS 9.2, which allows you to take an existing CSS file and read this file into a template definition. This new functionality allows you to now create a template definition from a CSS file. The style sheet properties of the CSS files will need to match the naming convention of what we expect.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The example illustrates how to import an existing CSS file into a template definition.
/* Create a sample CSS file from the default style. */
/* The IMPORT statement is used to import this style */
/* definition and create a template style. */
ods html stylesheet="C:\temp\example.css" style=styles.default;
ods html close;
proc template;
define style styles.test;
import "c:\temp\example.css";
end;
run;
ods pdf file="c:\temp\trash\temp.pdf" style=styles.test;
proc print data=sashelp.class;
run;
ods pdf close;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample illustrates how to convert an existing cascading style sheet (CSS) file to a comparable PROC TEMPLATE style definition.
Date Modified: | 2009-09-22 11:06:43 |
Date Created: | 2009-08-18 11:13:32 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.2 TS1M0 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS1M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS1M0 | |
Microsoft® Windows® for x64 | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS1M0 | |
Microsoft Windows XP Professional | 9.2 TS1M0 | |
Windows Vista | 9.2 TS1M0 | |
64-bit Enabled AIX | 9.2 TS1M0 | |
64-bit Enabled HP-UX | 9.2 TS1M0 | |
64-bit Enabled Solaris | 9.2 TS1M0 | |
HP-UX IPF | 9.2 TS1M0 | |
Linux | 9.2 TS1M0 | |
Linux for x64 | 9.2 TS1M0 | |
OpenVMS on HP Integrity | 9.2 TS1M0 | |
Solaris for x64 | 9.2 TS1M0 | |