BookmarkSubscribeRSS Feed
hellosisi
Calcite | Level 5
I'm using the code that the online help provided. Just modify the output file path and name.
I have two proc tabulate and supposed to generate two sheets in one workbook. Instead, it always generate two separate workbook with name aedata and aedata1.
I'm using Macbook pro Bootcamp installing Window7-64bit. However my SAS version is 9.2 (32bit).
Can anybody find out what is the problem?
Thanks a lot!

The code is as following:


options center;
title; footnote;
ods listing close;
ods tagsets.ExcelXP path=' ' file='aedata.xml' style=default;

proc tabulate data=sashelp.shoes;
class region;
var sales;
table region, sales='Sales'
*format=dollar20.0*sum='';
run;

proc tabulate data=sashelp.retail;
class year;
var sales;
table year='', sales='Sales (in M$)' *
format=dollar20.0 * sum=''/box='Year';
run;

ods tagsets.ExcelXP close;
2 REPLIES 2
MichelleHomes
Meteorite | Level 14
Hi there,

Your code is almost there... some minor option to get the sheet name and statements that you need to add to get it to produce what you were hoping...

options center;
title; footnote;
ods listing close;
ods tagsets.ExcelXP path=' ' file='aedata.xml' style=default options(sheet_Name="Shoes");

proc tabulate data=sashelp.shoes;
class region;
var sales;
table region, sales='Sales'
*format=dollar20.0*sum='';
run;

ods tagsets.ExcelXP options(sheet_Name="Retail");
proc tabulate data=sashelp.retail;
class year;
var sales;
table year='', sales='Sales (in M$)' *
format=dollar20.0 * sum=''/box='Year';
run;

ods tagsets.ExcelXP close;

I hope this helps.

Cheers,
Michelle
//Contact me to learn how Metacoda software can help keep your SAS platform secure - https://www.metacoda.com
Ksharp
Super User
[pre]
options center;
title; footnote;
ods listing close;
ods tagsets.ExcelXP file='c:\aedata.xls' style=default options(sheet_interval='proc');

proc tabulate data=sashelp.shoes;
class region;
var sales;
table region, sales='Sales'
*format=dollar20.0*sum='';
run;

proc tabulate data=sashelp.retail;
class year;
var sales;
table year='', sales='Sales (in M$)' *
format=dollar20.0 * sum=''/box='Year';
run;

ods tagsets.ExcelXP close;
ods listing;
[/pre]


Ksharp

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 627 views
  • 0 likes
  • 3 in conversation