Version

GetHiddenRows Method

Gets the hidden rows associated with the specified worksheet.
Syntax
'Declaration
 
Public Function GetHiddenRows( _
   ByVal worksheet As Worksheet, _
   Optional ByVal createIfNull As Boolean _
) As HiddenRowCollection
public HiddenRowCollection GetHiddenRows( 
   Worksheet worksheet,
   bool createIfNull
)

Parameters

worksheet
The worksheet whose associated hidden rows are to be retrieved.
createIfNull
True to create the hidden column 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. Also this will not allocate the collection unless the SaveHiddenRowsAndColumns is true.

Return Value

Null if SaveHiddenRowsAndColumns is False or if the worksheet does not belong to the workbook associated with this custom view; otherwise, the collection of hidden rows associated with the worksheet.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionworksheet is null.
Remarks

Adding rows on the returned HiddenRowCollection instance will not actually hide rows in the worksheet. After modifying the hidden rows in this collection, the Apply method of the CustomView will hide or unhide the rows.

Requirements

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