Sorry to bring it up.
Maybe style "cellwidth=" could help you .
P.S. I am using SAS9.4M4
ods excel file='c:\temp\reports.xlsx' style=seaside ;
data T ;
format X $256.;
X='Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.';
proc report data=t nowd ;
define x/display style(column)={cellwidth=100cm} ;
run;
ods excel close;
I'm running M6, and couldn't get it to work when writing a column called Name to Excel.
Name is my SAS field created by concatenating a person's First, Middle and Last Name fields, using CATX function to insert a space between each name. Excel would ALWAYS insert a "line-break" character between either first-and-middle or middle-and-last name! Ugh!
What worked for me was to change the space within " " to a non-breaking-space char (Alt-0160) as the delimiter to CATX function. Luckily, Excel enforces the non-breaking-space character.
name = catx(" ",FIRST, MIDDLE, LAST);
I'd rather avoid special characters. But thanks for the tip. M7 is supposed to come soon.... has been for a while now.... 🙂
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.