For updating only a single column it is probably easier to just set the width of the ws.column_info.width directly

This is a helper method that Lets you specify a fixed width for multiple columns in a worksheet in one go. Note that you must call column_widths AFTER adding data, otherwise the width will not be set successfully. Setting a fixed column width to nil will revert the behaviour back to calculating the width for you on the next call to add_row.


This would set the first and third column widhts but leave the second column in autofit state.

ws.column_widths 7.2, nil, 3


  • widths (Integer|Float|Fixnum|nil)

column_widths is referenced in 0 repositories