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.
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.
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.