Skip to content

Class Border

Namespace: OfficeOpenXml.Style
Assembly: EPPlus.dll

Cell Border style

public sealed class Border : StyleBase

Inheritance

object ← StyleBase ← Border

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

Bottom

Bottom border style

public ExcelBorderItem Bottom { get; }

Property Value

ExcelBorderItem

Diagonal

0Diagonal border style

public ExcelBorderItem Diagonal { get; }

Property Value

ExcelBorderItem

DiagonalDown

A diagonal from the top left to bottom right of the cell

public bool DiagonalDown { get; set; }

Property Value

bool

DiagonalUp

A diagonal from the bottom left to top right of the cell

public bool DiagonalUp { get; set; }

Property Value

bool

Left

Left border style

public ExcelBorderItem Left { get; }

Property Value

ExcelBorderItem

Right border style

public ExcelBorderItem Right { get; }

Property Value

ExcelBorderItem

Top

Top border style

public ExcelBorderItem Top { get; }

Property Value

ExcelBorderItem

Methods

BorderAround(ExcelBorderStyle, bool)

Set the border style around the range.

public void BorderAround(ExcelBorderStyle Style, bool overrideNeigbourCellBorder = true)

Parameters

Style ExcelBorderStyle

The border style

overrideNeigbourCellBorder bool

Set to true to override the border of adjacent cells.

BorderAround(ExcelBorderStyle, Color, bool)

Set the border style around the range.

public void BorderAround(ExcelBorderStyle Style, Color Color, bool overrideNeigbourCellBorder = true)

Parameters

Style ExcelBorderStyle

The border style

Color Color

The color of the border

overrideNeigbourCellBorder bool

Set to true to override the border of adjacent cells.