07-26-2012 07:51 AM
I want to create Excel pivot table from EG 4.2, which will consists of autofilters. I tried with ODS tagsets.tableeditor, but its not working in EG.
Can anyone suggest on this.
07-26-2012 09:18 AM
There seem to be many examples out there, hopefully they will help shed some light on the topic:
07-26-2012 11:27 AM
ods listing close;
title "Excel table with autofilters";
options ( sheet_name="Map"
autofilter = 'yes'
proc print data=sashelp.class;
ods tagsets.excelxp close;
07-26-2012 12:48 PM
TAGSETS.TABLEEDITOR should work to create a pivot table in Excel, if you got the suboptions correct. when you say it "doesn't work in EG" my guess is that 1) you still have the SASReport format turned on, so you're NOT seeing the output in Excel, you are seeing it inside the EG Results tab, as SASReport output; and/or 2) EG doesn't always like to open output that is aimed at Excel. So, if you do something like this:
ods _all_ close;
ods tagsets.tableeditor file='c:\temp\myreport.xls'
.... more options and suboptions ....;
procedure code goes here
ods tagsets.tableeditor close;
And then using Windows Explorer (outside of EG) go to c:\temp and find the file, you should be able to RMB on it and click Open with Excel. OR, you should be able to do a File-->Open from within Excel to navigate to c:\temp and find the file. Otherwise, if those suggestions do not work for you, I'd suggest that you open a track with Tech Support. TAGSETS.TABLEEDITOR is the method by which you can create pivot tables.