Sample 40159: How to name Microsoft Excel worksheets generated with the ExcelXP tagset
You can name Microsoft Excel worksheets generated by the ExcelXP tagset using the SHEET_NAME= tagset option. Specifying the SHEET_NAME= option allows you to override the default naming convention. You can specify the sheet name using the syntax below.
ods tagsets.excelxp file="c:\temp\temp.xml" options(sheet_name="Testing");
proc print data=sashelp.class;
run;
ods tagsets.excelxp close;
The sheet names can also be dynamically generated based on the BY group. You can use the SHEET_INTERVAL="BYGROUP" tagset option to have each sheet named based on the BY group. This will prefix the BY-variable name and the "=" in front of the value on the tab. You can remove the information prefixed in front of the tab by also adding the SHEET_LABEL=" " option, which has a null value.
proc sort data=sashelp.class out=temp;
by age;
run;
ods tagsets.excelxp file="c:\temp\temp.xml"
options(sheet_label=" " sheet_interval="bygroup");
proc print data=temp;
by age;
run;
ods tagsets.excelxp 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.
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 name Microsoft Excel worksheets generated with the ExcelXP tagset.
Date Modified: | 2011-07-25 15:44:19 |
Date Created: | 2010-06-30 13:41:30 |
Operating System and Release Information
SAS System | Base SAS | Tru64 UNIX | 9.1 TS1M3 SP4 | |
Solaris for x64 | 9.1 TS1M3 SP4 | |
OpenVMS Alpha | 9.1 TS1M3 SP4 | |
Linux on Itanium | 9.1 TS1M3 SP4 | |
Linux | 9.1 TS1M3 SP4 | |
HP-UX IPF | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
Windows Vista for x64 | 9.1 TS1M3 SP4 | |
Windows Vista | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
z/OS | 9.1 TS1M3 SP4 | |