BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Just upgraded to 9.2. All works fine. But when I use excelxp tagsets to create multiple sheet workbooks sas generates one workbook for each sheet.

Does anyone have solution for this problem?

Code used:

ods tagsets.excelxp file=book.xls style=statdoc;
ods tagsets.excelxp options( sheet_name='Sheet A' sheet_interval='proc');
proc tabulate;
ods tagsets.excelxp options( sheet_name='Sheet B' sheet_interval='proc');
proc tabulate;
ods tagsets.excelxp close;
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
HI,
That is very strange. When I run this program:
[pre]
ods tagsets.excelxp file='mywb.xls' style=statdoc;
ods tagsets.excelxp options(sheet_name='Lucy' sheet_interval='proc');
proc tabulate data=sashelp.class;
class age sex;
var height;
table sex,age,
height*(min mean max);
run;

ods tagsets.excelxp options(sheet_name='Ricky' sheet_interval='proc');
proc tabulate data=sashelp.class;
class height sex;
var age;
table sex,height,
age*(min mean max);
run;

ods tagsets.excelxp close;
[/pre]

using SAS 9.2, I get one workbook (mywb.xls) with two worksheets. I suggest that you check your SAS log for errors and, if there are no errors in the LOG, if your code still continues to give you a workbook for each procedure, then you should consider contacting SAS Tech Support for more help.

cynthia
deleted_user
Not applicable
Hello

Thanks for your response.

I have played around with the NEWFILE option. And the following code seems to have resolve my problem.

ods html close;
ods html newfile=bygroup;

/Anders
Cynthia_sas
SAS Super FREQ
Oh, I must have misread your original posting. I thought you wanted only ONE workbook using ODS TAGSETS.EXCELXP. I missed the need for multiple files for every BYGROUP using ODS HTML.

Glad you got it worked out!
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!

Discussion stats
  • 3 replies
  • 802 views
  • 0 likes
  • 2 in conversation