Syncfusion.XlsIO.Base
Example 


BorderNone Method

Applies no border in the Range.
Syntax
'Declaration
 
Sub BorderNone() 
'Usage
 
Dim instance As IRange
 
instance.BorderNone()
void BorderNone()
Example
The following code illustrates how to remove borders in the Range.
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];
            
            //Set text
            worksheet["C2"].Text = "Sample";
            
            //Set borders
            IBorders borders = worksheet["C2"].Borders;
            
            //Set border color
            borders[ExcelBordersIndex.EdgeTop].Color = ExcelKnownColors.Red;
            borders[ExcelBordersIndex.EdgeBottom].Color = ExcelKnownColors.Blue;
            
            //Set line style
            borders[ExcelBordersIndex.EdgeTop].LineStyle = ExcelLineStyle.Thick;
            borders[ExcelBordersIndex.EdgeBottom].LineStyle = ExcelLineStyle.Thick;
            
            //Remove borders
            worksheet["C2"].BorderNone();
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also