Desktop productivity for business analysts and programmers

Rename multiple excel worksheet names

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 129
Accepted Solution

Rename multiple excel worksheet names

Hi All,

 

I have multiple Proc Tabulates that I export out to excel workbook and I need to be able to five each worksheet a meaningful name.

 

I have used the ODS EXCEL option of sheet_name that names the first sheet to 'Entered' - how do I now assign names to the other worksheets?

 

ods excel file="/sasdata/OTH_Baselining.xlsx" options(Embedded_Titles='yes'
Embedded_footnotes='YES' sheet_name='Entered'); ods escapechar="^"; Title1 font=Arial BOLD "Other Business Line Baseline"; Title2 font=Arial BOLD "01January 2017 to 20 August 2017"; Proc Tabulate data=work.Other_Baseline_SUM format=comma9.0 out=work.Other_Baseline_2; */ where Event_DT >= '01Jul2016'd; class Queue_type CLUSTER SDOCLUSTERPBS QUEUE_CD; VAR CALLS_Entered_CNT; Table Queue_type = "" * Cluster = "" * SDOCLUSTERPBS = "" * queue_cd ,CALLS_Entered_CNT="" * sum / box= "Entered Calls" ; run; Proc Tabulate data=work.Other_Baseline_SUM format=comma9.0 out=work.Other_Baseline_2; */ where Event_DT >= '01Jul2016'd; class Queue_type CLUSTER SDOCLUSTERPBS QUEUE_CD; VAR CALLS_Answered_CNT; Table Queue_type = "" * Cluster = "" * SDOCLUSTERPBS = "" * queue_cd ,CALLS_Answered_CNT="" * sum / box= "Entered Calls" ; run; Title1; title2; ODS EXcel close;

Regards

 

Dean


Accepted Solutions
Solution
‎08-29-2017 09:08 PM
Frequent Contributor
Posts: 129

Re: Rename multiple excel worksheet names

I have used ODS excel options(sheet_name='XXXXX'); before each Proc Tabulate statement to rename the worksheet - this seems to be working for me.

 

Cheers

 

Dean

 

View solution in original post


All Replies
Solution
‎08-29-2017 09:08 PM
Frequent Contributor
Posts: 129

Re: Rename multiple excel worksheet names

I have used ODS excel options(sheet_name='XXXXX'); before each Proc Tabulate statement to rename the worksheet - this seems to be working for me.

 

Cheers

 

Dean

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 390 views
  • 0 likes
  • 1 in conversation