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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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