Version

GridlineColor Property (DisplayOptions)

Gets or sets the color of the gridlines on the worksheet.
Syntax
'Declaration
 
Public Property GridlineColor As Color
public Color GridlineColor {get; set;}

Property Value

The color of the gridlines on the worksheet.
Exceptions
ExceptionDescription
System.InvalidOperationException The workbook is using a custom palette and setting this color would cause the custom palette to use too many colors.
Remarks

If the workbook is using a standard palette, the color set may be changed if it is not in the palette. In this case, the closest color in the standard palette will be used.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, 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

See Also