sets the width of spreadsheet columns
id | id|array | the column id or an array of ids |
width | number|string | the width in pixels or "auto" |
page | string | optional, the name of the sheet |
$$("ssheet1").setColumnWidth(columnId, 120, "Sheet1");
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.