Sample 45255: Add pivot tables to an Excel worksheet using the TableEditor tagset
Pivot tables can be added to an Excel worksheet using the TableEditor tagset. Options such as PIVOTROW=, PIVOTCOL=, PIVOTPAGE, and PIVOTDATA= can be used to add one or more columns to the row, column, page, and data areas of the layout in Excel. To add multiple variables with one of these options, each variable is separated by commas. Additional options can be specified to modify the statistics or functions from the default of SUM. A button is added by default to the Web page. When using Microsoft Internet Explorer, the button can be selected to create the pivot table on Microsoft Windows.
The TableEditor tagset can be downloaded using the URL access method in the FILENAME statement as shown in the code below. The tagset can also be downloaded from the following location:
http://support.sas.com/rnd/base/ods/odsmarkup/tableeditor/tableeditor.tpl
ods path(prepend) work.templat(update);
filename temp url "http://support.sas.com/rnd/base/ods/odsmarkup/tableeditor/tableeditor.tpl";
%include temp;
ods tagsets.Tableeditor file="%sysfunc(getoption(work))\temp.html"
options(pivotrow="age"
pivotcol="sex"
pivotdata="height,weight"
pivotdata_stats="sum,mean");
proc print data=sashelp.class;
run;
ods tagsets.tableeditor 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 add pivot tables to an Excel worksheet using the TableEditor tagset.
Date Modified: | 2012-02-09 16:49:40 |
Date Created: | 2011-12-31 22:26:12 |
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
Windows Vista | 9.1 TS1M3 SP4 | |
Windows Vista for x64 | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | |
HP-UX IPF | 9.1 TS1M3 SP4 | |
Linux | 9.1 TS1M3 SP4 | |
Linux on Itanium | 9.1 TS1M3 SP4 | |
OpenVMS Alpha | 9.1 TS1M3 SP4 | |
Solaris for x64 | 9.1 TS1M3 SP4 | |
Tru64 UNIX | 9.1 TS1M3 SP4 | |