Description

class Axlsx::Border

This class details a border used in Office Open XML spreadsheet styles.

Note:

The recommended way to manage borders is with Style#add_style

Creates a new Border object

Examples:

  • Making a border

p = Axlsx::Package.new
red_border = p.workbook.styles.add_style :border => { :style => :thin, :color => "FFFF0000" }
ws = p.workbook.add_worksheet
ws.add_row [1,2,3], :style => red_border
p.serialize('red_border.xlsx')

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • diagonal_up (Boolean)
  • diagonal_down (Boolean)
  • outline (Boolean)

Returns The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the cell.

Returns The diagonal up property for the border that indicates if the border should include a diagonal line from the bottom left to the top right of the cell.

Returns The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of cells.

Returns A list of BorderPr objects for this border.

Serializes the object

Parameters:

  • str (String) (defaults to: '')

Border is referenced in 0 repositories