Sample 39540: Remove the spacing between titles and footnotes when creating output with the MSOffice2K destination
Spacing between the titles and footnotes in output generated with the MSOffice2K destination can be removed by modifying the default margin. The margin can be set using PROC TEMPLATE, or by adding the cascading style property for the margin in the HEADTEXT= option.
Please see the code on the Full Code tab for examples.
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.
These examples remove the spacing between the titles and footnotes in output generated with the MSOffice2K destination.
/***********************************************/
/* Modify the spacing between the titles and */
/* footnotes using PROC TEMPLATE. */
/***********************************************/
proc template;
define style styles.test;
parent=styles.default;
style systemtitle from systemtitle /
bottommargin=0
topmargin=0;
style systemfooter from systemtitle;
end;
run;
ods msoffice2k file="c:\temp.xls" style=styles.test;
proc print data=sashelp.class;
title "This is title1";
title2 "This is title2";
footnote "This is footnote1";
footnote2 "This is footnote2";
run;
ods msoffice2k close;
/*****************************************************/
/* Modify the spacing between titles and footnotes */
/* using the HEADTEXT= option. */
/*****************************************************/
ods msoffice2k file="c:\temp.xls" headtext="<style> h1 {margin:0}</style>";
proc print data=sashelp.class;
title "This is title1";
title2 "This is title2";
footnote "This is footnote1";
footnote2 "This is footnote2";
run;
ods msoffice2k 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 program illustrates how to remove the spacing between titles and footnotes when creating output with the MSOffice2K destination.
| Date Modified: | 2010-05-06 13:50:46 |
| Date Created: | 2010-05-05 22:12:14 |
Operating System and Release Information
| SAS System | Base SAS | 64-bit Enabled AIX | 9 TS M0 | |
| Microsoft Windows Server 2003 Standard Edition | 9 TS M0 | |
| Microsoft Windows XP Professional | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9 TS M0 | |
| Microsoft Windows 2000 Professional | 9 TS M0 | |
| Microsoft Windows NT Workstation | 9 TS M0 | |
| Microsoft Windows 2000 Server | 9 TS M0 | |
| Microsoft Windows 2000 Datacenter Server | 9 TS M0 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9 TS M0 | |
| Microsoft Windows 2000 Advanced Server | 9 TS M0 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9 TS M0 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9 TS M0 | |
| z/OS | 9 TS M0 | |
| OpenVMS Alpha | 9 TS M0 | |
| Tru64 UNIX | 9 TS M0 | |
| Linux | 9 TS M0 | |
| HP-UX IPF | 9 TS M0 | |
| 64-bit Enabled Solaris | 9 TS M0 | |
| 64-bit Enabled HP-UX | 9 TS M0 | |