BookmarkSubscribeRSS Feed
R_Win
Calcite | Level 5
Hi

I have a excel sheet by name Report now i want to export another output to that Report .xls file(in to another sheet2.)in ods.How can i do it Message was edited by: Michel_SAS
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
I believe that the only ways you can ADD a worksheet to an existing workbook are to use the LIBNAME engine or PROC EXPORT. If you use ODS TAGSETS.EXCELXP, ODS CSV, or ODS HTML, the entire file (what you put in the FILE= option of ODS) is overwritten with the new report information.

One approach, then is to recreate the entire workbook -- both the existing worksheet named Report (assuming you created it with SAS) and the new worksheet. If you were using BY group processing, this would be as easy as adding BY BYVARIABLE to your procedure syntax and then each bygroup would get a separate worksheet.

Otherwise, I have heard some folks read the first sheet into SAS and then write it back out along with any new information to the same named workbook.
Some useful papers that talk about using TAGSETS.EXCELXP:
http://support.sas.com/rnd/papers/sgf07/sgf2007-excel.pdf
http://www2.sas.com/proceedings/forum2008/192-2008.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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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