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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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