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;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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