Database Reference
In-Depth Information
Example 8.16.12 Build Separate Worksheets with Titles on Each Sheet
The next example uses the EMBED_TITLES_ONCE option. This example builds a workbook with
separate sheets for each BY group, and the option places the title and footnote from the SAS code into the
print header and print footer for the Excel pages.
Table 8.20: Options Used in Example 8.16.12.
ExcelXP Option
Setting in Example
Result
EMBED_TITLES_ONCE
'yes'
This option causes the SAS Title and
Footnote values to be used as the Excel
page setup Header and Footnote values.
Figure 8.52: Code to Put Heading and Footnote Information into Excel Worksheets.
ODS TAGSETS.EXCELXP BODY='c:\temp\ExcelXP\shoes12.xml'
options(EMBED_TITLES_ONCE='yes');
TITLE1 'This is my title line';
FOOTNOTE1 'This is my footnote line';
PROC PRINT DATA=sashelp.shoes;
BY region;
RUN;
ODS TAGSETS.EXCELXP CLOSE;
Figure 8.53: EXCELXP Code to Preset the Print Features of an Excel Workbook.
Notice here that I opened the Excel workbook and called up the “Page Setup” window manually to show
that Excel has preloaded values from the SAS TITLE and FOOTNOTE statements from the SAS code in
Figure 8.52.
 
Search WWH ::




Custom Search