BookmarkSubscribeRSS Feed
Vish33
Lapis Lazuli | Level 10

Hi,

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.

Thanks,

Vishnu

7 REPLIES 7
Haikuo
Onyx | Level 15

Hi,

Not familiar with EG. But by using tagsets.excelxp,  Autofilters and other features are easily done on BASE platform.

Haikuo

Vish33
Lapis Lazuli | Level 10

can you please write a sample  for that.

Haikuo
Onyx | Level 15

Sure.

ods listing close;

ods tagsets.excelxp

file="c:\yourfolder\yourfilename.xml"

style=statistical;

title "Excel table with autofilters";

ods tagsets.excelxp

options ( sheet_name="Map"

embedded_titles ='yes'

autofilter = 'yes'

frozen_headers='3');

proc print data=sashelp.class;

run;

ods tagsets.excelxp close;

ods listing;

HTH,

Haikuo

Cynthia_sas
SAS Super FREQ

Hi:

  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.

cynthia

Priya_18
Calcite | Level 5

When I Tried this method my excel file was throwing error as "the file format or file extension is not valid. Verify that the file is not been  corrupted and that the file extension matches the format of the file". I have tried with both the extensions as xls and also as xlsx.

Vish33
Lapis Lazuli | Level 10

Thank you for the helpful answers Haikuo and Cynthia..

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 5898 views
  • 6 likes
  • 5 in conversation