Version

GetDisplayOptions Method

Gets the display options associated with the specified worksheet.
Syntax
'Declaration
 
Public Function GetDisplayOptions( _
   ByVal worksheet As Worksheet, _
   Optional ByVal createIfNull As Boolean _
) As CustomViewDisplayOptions
public CustomViewDisplayOptions GetDisplayOptions( 
   Worksheet worksheet,
   bool createIfNull
)

Parameters

worksheet
The worksheet whose associated display options are to be retrieved.
createIfNull
True to create the display options if it has not yet been allocated. The options will be initialized based on the current state of the Worksheet. Note the options should only have been null if there were no options for the Worksheet when the Workbook was loaded.

Return Value

Null if the worksheet does not belong to the workbook associated with this custom view; otherwise, the display options associated with the worksheet.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionworksheet is null.
Remarks

Setting properties on the returned DisplayOptions instance will not change the actual display of the worksheet. After setting properties, the Apply method of the CustomView will apply them to the worksheet.

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