'Declaration
Public Class Border Inherits Xceed.Workbooks.NET.StyleBase(Of IReadonlyBorder) Implements IReadonlyBorder
'Usage
Dim instance As Border
public class Border : Xceed.Workbooks.NET.StyleBase<IReadonlyBorder>, IReadonlyBorder
'Declaration
Public Class Border Inherits Xceed.Workbooks.NET.StyleBase(Of IReadonlyBorder) Implements IReadonlyBorder
'Usage
Dim instance As Border
public class Border : Xceed.Workbooks.NET.StyleBase<IReadonlyBorder>, IReadonlyBorder
var workbook = Workbook.Create("test.xlsx" ) // Get the first worksheet. A workbook contains at least 1 worksheet. var cellWorksheet = workbook.Worksheets[ 0 ]; // Set cell content and Border styles. cellWorksheet.Cells[ "C5" ].Value = "Bottom"; cellWorksheet.Cells[ "C5" ].Style.Borders[ BorderType.Bottom ].Style = LineStyle.Double; cellWorksheet.Cells[ "C5" ].Style.Borders[ BorderType.Bottom ].Color = Color.Red; cellWorksheet.Cells[ "C8" ].Value = "Top"; cellWorksheet.Cells[ "C8" ].Style.Borders[ BorderType.Top ].Style = LineStyle.DashDot; cellWorksheet.Cells[ "C11" ].Value = "Right"; cellWorksheet.Cells[ "C11" ].Style.Borders[ BorderType.Right ] = new Border() { Style = LineStyle.MediumDashed, Color = Color.Green }; // Save workbook to disk. workbook.Save();
System.Object
Xceed.Workbooks.NET.StyleBase<T>
Xceed.Workbooks.NET.Border
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2