Use a single style= option in your define statement.
ods excel file="&xxproject/reporting/test.xlsx";* options(flow='table');
proc report data=sashelp.cars nowd split="*";
column Drivetrain msrp;
define Drivetrain / display;
define MSRP / display "Local Indian Security Value*inc. Accrued Interest"
style (column)=[cellwidth=.5in
textalign=right
tagattr='format: #,##0.00']
format=comma10.2;
run;
ods excel close;
Are you generating plain old text output? If so then make the width value longer so it does not have to chop words in half.
Or are you generating ODS output ("fancy" output)? If so then use STYLE= option to set the column width.
Example with both:
proc report data=sashelp.class split='*';
col name sex age;
define name/display;;
define sex/display ;
define age/display width=20 format=5. style=[width=1 in]
'Indian society*Boys and girls*age details as per certificate'
;
run;
Indian socity S Boys and girls e age details as per Name x certificate Alfred M 14 Alice F 13 Barbara F 13 Carol F 14 Henry M 14 James M 12 Jane F 12 Janet F 15 Jeffrey M 13 John M 12 Joyce F 11 Judy F 14 Louise F 12 Mary F 15 Philip M 16 Robert M 12 Ronald M 15 Thomas M 11 William M 15
How wide do you want it to be? I added code to make it 1.5 inches.
Proc report data=sashelp.class split='*';
Col name sex age;
Define name/display;;
Define sex/display ;
Define age/display style(column)=[cellwidth=1.5in] format=5. 'Indian socity*Boys and girls*age details as per certificate*;
Run;
Hi,
I don't have any issue when running your code on my computer.
Is there any message in the log? Can you share a picture of the result you get?
Have you tried to split the statement into several lines? It could be that the width of your screen editor is too short.
Make sure ls=max too.
Best Regards,
Use a single style= option in your define statement.
ods excel file="&xxproject/reporting/test.xlsx";* options(flow='table');
proc report data=sashelp.cars nowd split="*";
column Drivetrain msrp;
define Drivetrain / display;
define MSRP / display "Local Indian Security Value*inc. Accrued Interest"
style (column)=[cellwidth=.5in
textalign=right
tagattr='format: #,##0.00']
format=comma10.2;
run;
ods excel close;
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.