Is there a way to prevent my AREA column (which does get assigned a long character value for some observations) from automatically wrapping the text into a multiple lines within the cell? (see the attached pic)
I really don't want to have to manually format this column after the fact by turning off auto wrapping and the increasing the column width.
I'd really appreciate some help with this. Thanks.
/* EXPORT THE FILE TO XLS USING ODS */
OPTION MISSING = '';
ODS EXCEL FILE="C:\USERS\STEVEBUECHLER\BOX SYNC\IBM\USPS\HRC PAY DATA ANALYSIS\&SITE._HCR_PD_SUMMARY.XLSX";
PROC REPORT DATA=&SITE._HCR_SUMMARY_F;
COMPUTE AREA;
IF FIND(AREA,"AREA SITE GRAND TOTAL") THEN
CALL DEFINE(_ROW_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=BLUE]");
ENDCOMP;
COMPUTE PAY_DATA_MONTH_CHR;
IF FIND(PAY_DATA_MONTH_CHR,"HCR CONTRACT TOTAL") THEN
CALL DEFINE(_ROW_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
BACKGROUND=HONEYDEW]");
ENDCOMP;
COMPUTE ACTIVITY_DESCRIPTION;
IF FIND(ACTIVITY_DESCRIPTION,"CONTRACT SUBTOTAL") THEN
CALL DEFINE(_COL_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=DARKGREEN
BACKGROUND=HONEYDEW]");
ENDCOMP;
COMPUTE FREQ;
IF FIND(ACTIVITY_DESCRIPTION,"CONTRACT SUBTOTAL") THEN
CALL DEFINE(_COL_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=DARKGREEN
BACKGROUND=HONEYDEW]");
ENDCOMP;
COMPUTE PAY_AMOUNT;
IF FIND(ACTIVITY_DESCRIPTION,"CONTRACT SUBTOTAL") THEN
CALL DEFINE(_COL_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=DARKGREEN
BACKGROUND=HONEYDEW]");
ENDCOMP;
COMPUTE RATE_PER_UNIT;
IF FIND(ACTIVITY_DESCRIPTION,"CONTRACT SUBTOTAL") THEN
CALL DEFINE(_COL_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=DARKGREEN
BACKGROUND=HONEYDEW]");
ENDCOMP;
COMPUTE UNITS;
IF FIND(ACTIVITY_DESCRIPTION,"CONTRACT SUBTOTAL") THEN
CALL DEFINE(_COL_, "STYLE", "STYLE=[FONTWEIGHT=BOLD
FOREGROUND=DARKGREEN
BACKGROUND=HONEYDEW]");
ENDCOMP;
COLUMNS _ALL_;
RUN;
ODS EXCEL CLOSE;
First thing I would try would be to add a DEFINE block for the variable
define area / style(column)=[cellwidth= 1in] ;
should set the column width to one inch. You can us other units of measure like CM if you like and can use decimal values such a 1.75CM or 2.1IN .
First thing I would try would be to add a DEFINE block for the variable
define area / style(column)=[cellwidth= 1in] ;
should set the column width to one inch. You can us other units of measure like CM if you like and can use decimal values such a 1.75CM or 2.1IN .
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.