Method: RubyXL::LegacyWorksheet#change_column_width
- Defined in:
- lib/rubyXL/worksheet.rb
#change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH) ⇒ Object
Get column width measured in number of digits, as per msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column%28v=office.14%29.aspx
54 55 56 |
# File 'lib/rubyXL/worksheet.rb', line 54 def change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH) change_column_width_raw(column_index, ((width_in_chars + (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)) * 256).to_i / 256.0) end |