Version

GetHiddenColumns Method

Gets the hidden columns associated with the specified worksheet.
Syntax
public HiddenColumnCollection GetHiddenColumns( 
   Worksheet worksheet,
   bool createIfNull
)

Parameters

worksheet
The worksheet whose associated hidden columns are to be retrieved.
createIfNull
True to create the hidden column if it has not yet been allocated of the Worksheet. The options will be initialized based on the current state. 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 columns associated with the worksheet.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionworksheet is null.
Remarks

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

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