BookmarkSubscribeRSS Feed
SU22
Calcite | Level 5

Hi,

 

I have a SAS program that outputs an excel file with different tabs (eg 10 tabs). On the same Excel file, I want to create another tab right before all those 10 tabs to use as a table of contents. On that sheet, I want to grab A2 of all those tabs and list them in each row on the new sheet that I want to use as table of content.

What do you recommend?

Thanks,

 

2 REPLIES 2
JosvanderVelden
SAS Super FREQ
Have you seen this blogpost: https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/ . See the section "Navigating a Microsoft Excel Workbook".

Best regards, Jos
Tom
Super User Tom
Super User

There is on option to turn on the generation of a table of contents.

ods excel file='c:\downloads\contents.xlsx' options(contents='on');
proc print data=sashelp.class; run;
proc means data=sashelp.class; run;
ods excel close;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 864 views
  • 1 like
  • 3 in conversation