Object Reference : Object View and Procedure Reference : Table
  
 
setwidth
Set the column width for selected columns in a table.
Syntax
table_name.setwidth(col_range) width_arg
where col_range is either a single column number or letter (e.g., “5”, “E”), a colon delimited range of columns (from low to high, e.g., “3:5”, “C:E”), or the keyword “@ALL”, and width_arg specifies the width unit value. The width unit is computed from representative characters in the default font for the current table (the EViews table default font at the time the table was created), and corresponds roughly to a single character. width_arg values may be non-integer values with resolution up to 1/10 of a width unit.
Examples
tab1.setwidth(2) 12
sets the width of column 2 to 12 width units.
tab1.setwidth(2:10) 20
sets the widths for columns 2 through 10 to 20 width units.
You many conditionally set the column width. This will set the individual column widths of columns c through e to 5 if the cells in column b are greater than 0.5. Specifically, the width of column c will be set to 5 if cell b20 is greater than 0.5:
tab1.setwidth(c:e if [b20:d20] > .5) 5
Cross-references
See Table::setheight, Table::setindent and Table::setjust for details on setting table height, indentation and justification.
For additional discussion of table commands see “Working with Tables and Spreadsheets”.
See also “Table and Text Objects” for a discussion and examples of table formatting in EViews.