New to Telerik Document ProcessingStart a free 30-day trial

Collection of named reusable cell styles enabling lookup, addition, and enumeration by style name.

Definition

Namespace:Telerik.Documents.SpreadsheetStreaming

Assembly:Telerik.Documents.SpreadsheetStreaming.dll

Syntax:

C#
public class SpreadCellStyleCollection : IEnumerable<SpreadCellStyle>, IEnumerable

Inheritance: objectSpreadCellStyleCollection

Implements: IEnumerableIEnumerable<SpreadCellStyle>

Properties

Number of styles currently stored in the collection.

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

The number of elements contained in this collection.

Indexer returning the SpreadCellStyle matching the provided name, or null if it does not exist.

C#
public SpreadCellStyle this[string styleName] { get; }
Parameters:styleNamestringProperty Value:

The spread cell style.

Methods

Adds a newly created style with the specified unique name and returns it.

C#
public SpreadCellStyle Add(string styleName)
Parameters:styleNamestring

The name of the new cell style.

Returns:

SpreadCellStyle

The style.

Checks whether the specified style instance is present (by matching its name).

C#
public bool Contains(SpreadCellStyle style)
Parameters:styleSpreadCellStyle

The style.

Returns:

bool

True if it is present; otherwise, false.

Checks whether a style with the given name exists in the collection.

C#
public bool Contains(string styleName)
Parameters:styleNamestring

The name of the style.

Returns:

bool

True if it is present; otherwise, false.

Retrieves the style with the specified name, or null if it is not found.

C#
public SpreadCellStyle GetByName(string styleName)
Parameters:styleNamestring

The name of the style.

Returns:

SpreadCellStyle

The style.

Returns a generic enumerator over the styles in the collection.

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

IEnumerator<SpreadCellStyle>

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

Implements: IEnumerable<SpreadCellStyle>.GetEnumerator()