BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a project that requires me to put all 50 states in one workbook with each tab respresenting a state. I would like to name the tabs in my workbook. How do I do that. I am think a Macro that is called to label the tabs, but I am not sure how to name the tabs in the first place.
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Look at the example of the SHEET_NAME option in this Tech Support note:
http://support.sas.com/kb/33/564.html

cynthia
SASKiwi
PROC Star
In addition to Cynthia's suggestion, have a look at:

ods tagsets.excelxp
options ( SHEET_NAME = 'STATE' SHEET_INTERVAL = 'BYGROUP')
;

If your data is sorted in state order and you do your report using a BY statement then the above will automatically create a new tab/worksheet for each state and will append a number on the end of the sheet name. This is a very easy technique to produce a multi-tab Excel workbook.

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!

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.

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
  • 2 replies
  • 713 views
  • 0 likes
  • 3 in conversation