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

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!

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
  • 620 views
  • 0 likes
  • 2 in conversation