Syncfusion.XlsIO.Base
Example 


GridLineColor Property

Gets or sets the color of the Grid line in the worksheet.
Syntax
'Declaration
 
Property GridLineColor As ExcelKnownColors
'Usage
 
Dim instance As IWorksheet
Dim value As ExcelKnownColors
 
instance.GridLineColor = value
 
value = instance.GridLineColor
ExcelKnownColors GridLineColor {get; set;}
Example
The following code illustrates how to set the grid line color.
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(2);
            IWorksheet worksheet = workbook.Worksheets[0];
            
            //Set grid lines color
            worksheet.GridLineColor = ExcelKnownColors.Red;
            
            //Save and dispose
            workbook.SaveAs("CellFormats.xlsx");
            workbook.Close();
        }
    }
}
AssemblyVersion

Syncfusion.XlsIO.Base: 16.4460.0.40

See Also