BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Super User


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} ;
ods excel close;



Quartz | Level 8

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);
Tourmaline | Level 20

I'd rather avoid special characters. But thanks for the tip. M7 is supposed to come soon.... has been for a while now.... 🙂


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 17 replies
  • 8 in conversation