New to Telerik Document ProcessingStart a free 30-day trial

Provides a type-filtered view over a workbook's sheet collection, exposing only sheets of a specific type.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Type Parameters:

T

The type of the sheet.

Syntax:

C#
public abstract class FilteredSheetCollection<T> : IEnumerable<T>, IEnumerable where T : Sheet

Inheritance: objectFilteredSheetCollection<T>

Derived Classes: WorksheetCollection

Implements: IEnumerableIEnumerable<T>

Methods

Creates a new sheet of type T and appends it at the end of the collection.

C#
public T Add()
Returns:

T

The created sheet.

Removes all sheets of type T from the collection and workbook.

C#
public void Clear()

Checks whether a sheet with the specified name (case-insensitive) exists in the collection.

C#
public bool Contains(string sheetName)
Parameters:sheetNamestring

Name of the sheet.

Returns:

bool

The value indicating whether the collection contains a sheet with the specified sheet name.

Checks whether the specified sheet exists in the collection.

C#
public bool Contains(T item)
Parameters:itemT

The item.

Returns:

bool

The value indicating whether the collection contains the specified sheet.

Retrieves the sheet with the specified name (case-insensitive), or null if not found.

C#
public T GetByName(string sheetName)
Parameters:sheetNamestring

Name of the sheet.

Returns:

T

The sheet.

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<T> GetEnumerator()
Returns:

IEnumerator<T>

A IEnumerator<T> that can be used to iterate through the collection.

Implements: IEnumerable<T>.GetEnumerator()

Hides the sheet at the specified zero-based index, making it invisible in the workbook.

C#
public void Hide(int index)
Parameters:indexint

The index.

Hides the specified sheet, making it invisible in the workbook.

C#
public void Hide(T sheet)
Parameters:sheetT

The sheet.

Searches for a sheet by name (case-insensitive) and returns its zero-based index, or -1 if not found.

C#
public int IndexOf(string sheetName)
Parameters:sheetNamestring

Name of the sheet.

Returns:

int

The index of the item

Searches for the specified sheet and returns its zero-based index, or -1 if not found.

C#
public int IndexOf(T item)
Parameters:itemT

The item.

Returns:

int

The index of the item.

Creates a new sheet of type T and inserts it at the specified zero-based index.

C#
public T Insert(int index)
Parameters:indexint

The index.

Returns:

T

The created sheet.

Removes the sheet with the specified name (case-insensitive) from the collection and workbook.

C#
public bool Remove(string sheetName)
Parameters:sheetNamestring

Name of the sheet.

Returns:

bool

The value indicating whether a sheet by the specified name was found.

Removes the specified sheet from the collection and workbook.

C#
public bool Remove(T item)
Parameters:itemT

The item.

Returns:

bool

The value indicating whether the specified sheet was found.

Removes the sheet at the specified zero-based index from the collection and workbook.

C#
public void RemoveAt(int index)
Parameters:indexint

The index.

Unhides the sheet at the specified zero-based index, making it visible in the workbook.

C#
public void Unhide(int index)
Parameters:indexint

The index.

Unhides the specified sheet, making it visible in the workbook.

C#
public void Unhide(T sheet)
Parameters:sheetT

The sheet.

Properties

Gets the number of sheets of type T in the collection.

C#
public int Count { get; }
Property Value:

The item count.

Gets the sheet of type T at the specified zero-based index.

C#
public T this[int index] { get; }
Parameters:indexint

Gets the sheet of type T with the specified name (case-insensitive).

C#
public T this[string sheetName] { get; }
Parameters:sheetNamestring

Gets the workbook that owns this sheet collection.

C#
public Workbook Workbook { get; }
Property Value:

The workbook.