Method: RubyXL::WorksheetConvenienceMethods#get_column_width
- Defined in:
- lib/rubyXL/convenience_methods/worksheet.rb
permalink #get_column_width(column_index = 0) ⇒ 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
367 368 369 370 371 |
# File 'lib/rubyXL/convenience_methods/worksheet.rb', line 367 def get_column_width(column_index = 0) width = get_column_width_raw(column_index) return RubyXL::ColumnRange::DEFAULT_WIDTH if width.nil? (width - (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)).round end |