Syncfusion.XlsIO.Base
Example 


Borders Property (IExtendedFormat)

Returns IBorders object for this extended format.
Syntax
'Declaration
 
ReadOnly Property Borders As IBorders
'Usage
 
Dim instance As IExtendedFormat
Dim value As IBorders
 
value = instance.Borders
IBorders Borders {get;}
Example
The following code illustrates how to access Borders property.
using Syncfusion.XlsIO;
            
class Program
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
            //Create worksheet
            IApplication application = excelEngine.Excel;
            application.DefaultVersion = ExcelVersion.Excel2013;
            IWorkbook workbook = application.Workbooks.Create(1);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Add style
            IStyle style = workbook.Styles.Add("CustomStyle");
            
            //Set border
            style.Borders.Color = ExcelKnownColors.Blue;
            style.Borders.LineStyle = ExcelLineStyle.Thick;
            
            //Set style
            worksheet["C2"].CellStyle = style;
            
            //Get extended format
            IExtendedFormat format = worksheet["E2"].CellStyle;
            
            //Set border
            format.Borders.Color = ExcelKnownColors.Red;
            format.Borders.LineStyle = ExcelLineStyle.Thick;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also