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
SAS Super FREQ
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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

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
  • 1 reply
  • 664 views
  • 0 likes
  • 2 in conversation