BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

ods listing close;

options missing=' ' topmargin=0.30in bottommargin=0.01in rightmargin=0.25in leftmargin=0.25in;

 

ODS TAGSETS.ExcelXP file="&ReportOut..xml" Path="&OutDir" style=&dors_style;

 

 

%macro Final(final,sheet_nm);                 

          

 

ODS TAGSETs.ExcelXP

options(sheet_interval= 'None'

        sheet_name= &sheet_nm.

        Orientation= 'landscape'

        Frozen_Headers = '1'

        EMBEDDED_TITLES = "YES"

        EMBEDDED_FOOTNOTES = "YES"

        GRIDLINES ="YES"

        AutoFit_Height = "YES"

        absolute_column_width="YES");     

                    

%NoAccountLogic(&final.,&ReportName);               

           PROC REPORT DATA=&final. headskip split='*' wrap nowd     

                    

           style(report)=[background=black cellspacing=10 just=center font_size=11pt font_face="Calibri" bordercolor=black borderwidth=1]       

           style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]      

          

           ;         

 

         

 COLUMNS _all_;     

                DEFINE SERVICER_CLIENT_CODE /Display style(column)={tagattr="format:0000000000" cellwidth=180pt just=LEFT} ;   

                DEFINE  SERVICER_LOAN_NUMBER /  Display style(column)={tagattr="format:0000000000" cellwidth=180pt just=left} ;

 

 

 In this code snippet notice I define the cell width.  I have adjusted the size to account for the headers.  Is there a way to have each header automatically wrap after each_  In orther words SERVICER_CLIENT_CODE becomes SERVICER_

                                                                                                                                                      CLIENT_

                                                                                                                                                      CODE_

Alternately is there a way to dynamically structure the headers so that parts of the word do not cut off and move to the next line.  I think the presence of the _  may be the cause.  I do not have the issue when I eliminate the _

 

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why do you want column name as the label?  Is this a data transfer, if so I would strongly advise to use something other than Excel.

As for your question, you can use the split=character option and specify a label:

define servicer_client_code / "SERVICER_*CLIENT_*CODE"...;

ballardw
Super User

Another approach would be to use Labels without the _ in them

 

label SERVICER_CLIENT_CODE = "SERVICER CLIENT CODE";

Most of the procedures such as Report will attemp to use a label if in exists and if the space is limited will attempt to fit by breaking at spaces. Since this is a report then you will get "prettier" output.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 1143 views
  • 0 likes
  • 3 in conversation