Its likely to be an Excel "feature". When I run it the text is centered and so I see this:
Now, one way to fix it is to make the cells big enough to show the whole title, in my instance I updated my code to include (in proc report not print) the style= to make all the columns 5cm in width:
ods tagsets.excelxp file="s:/temp/rob/test.xml" options(sheet_name="test" embedded_titles = 'Yes' autofilter='all'
frozen_headers='3') style=statistical;
title1 j=l bold height=14pt color=red "NOT VALIDATED - FOR INTERNAL USE ONLY - NOT VALIDATED - FOR INTERNAL USE ONLY - NOT VALIDATED - FOR INTERNAL USE ONLY";
proc report data=sashelp.class nowd style(column)=[cellwidth=5cm];
run;
ods tagsets.excelxp close;
If you have SAS 9.3 onwards you can use ods excel, which does seem to make this work correctly and wrap accordingly:
ods excel file="s:/temp/rob/test.xlsx" options(sheet_name="test" embedded_titles = 'Yes' autofilter='all'
frozen_headers='3' title_footnote_width='5') style=statistical;
title1 bold height=14pt color=red "NOT VALIDATED - FOR INTERNAL USE ONLY - NOT VALIDATED - FOR INTERNAL USE ONLY - NOT VALIDATED - FOR INTERNAL USE ONLY";
proc report data=sashelp.class nowd style(column)=[cellwidth=5cm];
run;
ods excel close;
Alternatively you could put the title in the titles section and change the view to print layout. To be honest though, Excel is a spreadsheet, titles/footnotes are document items.
Edit: Note, if your still only still one word, you may need to put j=l after title1, e.g. title1 j=1 bold...
Otherwise it gets centered.
... View more