Version

Style Property (IWorksheetCellFormat)

Gets or sets the parent WorkbookStyle of the format.
Syntax
'Declaration
 
Property Style As WorkbookStyle
WorkbookStyle Style {get; set;}

Property Value

A WorkbookStyle instance if this is a cell or differential format, or null if this is a style format.
Exceptions
ExceptionDescription
System.InvalidOperationException The value assigned is non-null and the format is a style format.
System.ArgumentExceptionThe value assigned is from a different Workbook.
Remarks

The parent style of a cell or differential format provides default format values. Depending on which FormatOptions flags are present, only certain groups of format properties will be resolved from parent style. When any of the properties in a group is set to a non-default value, the FormatOptions will automatically have that flag included so the format provides values in that group rather than the style providing values in that group.

By default, all cell and differential formats will have a parent style of the normal style, which is exposed by the WorkbookStyleCollection.NormalStyle property. If a value of null is assigned as the Style for a cell or differential format, then NormalStyle will actually be set.

Requirements

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

View on GitHub