Method: RubyXL::WorksheetConvenienceMethods#change_column_border

Defined in:
lib/rubyXL/convenience_methods/worksheet.rb

#change_column_border(column_index, direction, weight) ⇒ Object

[View source]

635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/rubyXL/convenience_methods/worksheet.rb', line 635

def change_column_border(column_index, direction, weight)
  validate_workbook
  ensure_cell_exists(0, column_index)

  cols.get_range(column_index).style_index = @workbook.modify_border(get_col_style(column_index), direction, weight)

  sheet_data.rows.each { |row|
    next if row.nil?
    c = row.cells[column_index]
    next if c.nil?
    c.change_border(direction, weight)
  }
end