BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello, 

 

I am using SAS EG 7.13 , and I need to create an Excel file with two different sheets containing title (see the provided worksheet). I the first sheet will be filled-up first then close.  The data will be bring into the second sheet using another sas program ( it is why , I am looking for an append option).

 

Can we do this task with ods or with another one.

 

 

1 ACCEPTED SOLUTION
5 REPLIES 5
ChrisHemedinger
Community Manager

You can add multiple sheets to an ODS EXCEL destination by using the SHEET_INTERVAL options.  You can break sheets along PROC boundaries, tables, or arbitrary break points within your process by adjusting the SHEET_INTERVAL. 

 

However, once you close the destination with ODS EXCEL CLOSE, you cannot append the sheet with ODS EXCEL again.  ODS EXCEL (open) will always create/write over the XLSX file.

 

But PROC EXPORT can be used to add/replace sheets in an existing workbook.  I have an example of this here.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
alepage
Barite | Level 11

Hello,

 

The libname statement is a nice options but I think that I will loose my title1 and title2 into the worksheet.  Am I right.

 

ChrisHemedinger
Community Manager

Correct. PROC EXPORT and LIBNAME XLSX are for data only.  ODS EXCEL allows for report elements, including titles, footnotes, graphics, and generate report formatting with colors, etc.

Become an Explorer! Join SAS Analytics Explorers to learn and complete challenges that earn rewards!
brb
Calcite | Level 5 brb
Calcite | Level 5

Goodness me, SAS is so limiting.  I am forced to use SAS for my current project which is why I am here.  Python has multiple ways of doing this easily.  Anyone new to SAS, save your time and money and learn Python or R instead.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 5 replies
  • 7244 views
  • 4 likes
  • 4 in conversation