setColumnWidth

sets the width of spreadsheet columns

void setColumnWidth(id|array id,number|string width, [string page] );
idid|arraythe column id or an array of ids
widthnumber|stringthe width in pixels or "auto"
pagestringoptional, the name of the sheet

Example

$$("ssheet1").setColumnWidth(columnId, 120, "Sheet1");

Details

In order to adjust the width of a column to its content, pass "auto" to the method as the second parameter:

$$("ssheet1").setColumnWidth(columnId, "auto");

Note that the width:auto setting will work for the active sheet only.

You can pass an array of ids as the first parameter like this:

$$("ssheet1").setColumnWidth([3, 6], "auto");

In this case the columns from 3 to 6 will adjust their width to the content inside.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix best ui framework and page of spreadsheet product.