Syncfusion.XlsIO.Base
Example 


BorderAround() Method

Applies border around the Range. The default line style is ExcelLineStyle.Thin.
Syntax
'Declaration
 
Overloads Sub BorderAround() 
'Usage
 
Dim instance As IRange
 
instance.BorderAround()
void BorderAround()
Example
The following code illustrates how to apply border around 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";
            worksheet["D2"].Text = "text";
            worksheet["C3"].Text = "in";
            worksheet["D3"].Text = "cell";
            
            //Set border
            worksheet["C2:D3"].BorderAround();
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 17.1460.0.32

See Also