BookmarkSubscribeRSS Feed
sas_
Fluorite | Level 6
Hi
How can i move all the three datasets in to single excel sheet one after the other.For me the problem is it is creating three excel sheets separately how can i move all the three in to single excel sheet continously.Now i want sashelp.class to print in the same sheet for three times .
And is there any replace options as if we run the same for 2-3 times it should overwrite the old one.

ods tagsets.ExcelXP file="C:\Documents and Settings\out.xls" ;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
proc print data=sashelp.class;
run;
ods tagsets.ExcelXP close;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
Look at the internal help for TAGSETS.EXCELXP -- you will see it in the SAS log if you ask for the doc in a sub-option:
[pre]
ods tagsets.ExcelXP file="C:\Documents and Settings\out.xls"
options(doc='Help');
[/pre]

In the doc in the SAS log, you will find the sheet_name and sheet_interval sub-options. You should be able to use the sheet_interval sub-option to get all 3 procedure outputs in one sheet.

This paper discusses many of the sub-options that affect how the spreadsheet is created (including print headers, print footers, etc):
http://www.nesug.org/proceedings/nesug08/ap/ap06.pdf

cynthia
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1000 views
  • 0 likes
  • 2 in conversation