BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

What is the different in proc report between  width statement  and cellwidth statement?

Are both adjust column width?

 

 

 

 

 

 

3 REPLIES 3
Ksharp
Super User

'width' is obsolete, it is just suited for LISTING destination . use 'cellwidth' just fine.

Cynthia_sas
Diamond | Level 26

Hi: To clarify the use of WIDTH -- There are actually 2 ways to specify WIDTH in PROC REPORT. LISTING destination uses the WIDTH option, not in any special syntax:
define varname / display 'label' width=6;

or you can use a style override for other ODS destinations in which WIDTH and CELLWIDTH are aliases:
define varname / display 'label'
style(column)={width=1.5in color=red};
or
define varname /display 'label'
style(column)={cellwidth=1.5in color=red};

In the simple LISTING example, WIDTH is the number of characters wide the column needs to be when displayed in a fixed pitch font. In the STYLE override examples, WIDTH= or CELLWIDTH= can be used interchangeably and you specify a number, followed by a unit of measure, pixels, inches, cm or percent.

Cynthia

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 5910 views
  • 4 likes
  • 4 in conversation