Version

Style Property (IWorksheetCellFormat)

Gets or sets the parent WorkbookStyle of the format.
Syntax
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: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also