Class Border
Class Border
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
Encapsulates the object that represents the cell border.
public class Border
Inheritance
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Examples
Workbook workbook = new Workbook();
WorksheetCollection sheets = workbook.Worksheets;
Cell cell = sheets[0].Cells["A1"];
Style style = cell.GetStyle();
//Set top border style and color
Border border = style.Borders[BorderType.TopBorder];
border.LineStyle = CellBorderType.Medium;
border.Color = Color.Red;
cell.SetStyle(style);
Dim workbook as Workbook = New Workbook()
Dim sheets as WorksheetCollection = workbook.Worksheets
Cell cell = sheets(0).Cells("A1");
Dim style as Style = cell.GetStyle()
'Set top border style and color
Dim border as Border = style.Borders(BorderType.TopBorder)
border.LineStyle = CellBorderType.Medium
border.Color = Color.Red
cell.SetStyle(style);
Properties
ArgbColor
Gets and sets the color with a 32-bit ARGB value.
public int ArgbColor { get; set; }
Property Value
Color
Gets or sets the System.Drawing.Color of the border.
public Color Color { get; set; }
Property Value
LineStyle
Gets or sets the cell border type.
public CellBorderType LineStyle { get; set; }
Property Value
ThemeColor
Gets and sets the theme color of the border.
public ThemeColor ThemeColor { get; set; }