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 _
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"...;
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.