• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for .NET MAUI UI for Xamarin
    Document Management
    Telerik Document Processing
    Desktop
    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    CMS
    Sitefinity
    UI/UX Design
    Unite UX
    Debugging
    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Jam FiddlerCap FiddlerCore
    Extended Reality
    UI for Unity XR
    Free Tools
    JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class SheetCollection

Collection of Sheet.

Inheritance
System.Object
SheetCollection
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public class SheetCollection : IEnumerable<Sheet>, IEnumerable

Properties

ActiveSheet

Gets or sets the active sheet.

Declaration
public Sheet ActiveSheet { get; set; }
Property Value
Sheet

The active sheet.

ActiveSheetIndex

Gets or sets the index of the active sheet.

Declaration
public int ActiveSheetIndex { get; set; }
Property Value
System.Int32

The index of the active sheet.

Count

Gets the count of the sheets.

Declaration
public int Count { get; }
Property Value
System.Int32

The count of the sheets.

Item[Int32]

Gets the Sheet at the specified index.

Declaration
public Sheet this[int index] { get; }
Parameters
System.Int32 index

Property Value
Sheet

The sheet.

Item[String]

Gets the Sheet with the specified sheet name.

Declaration
public Sheet this[string sheetName] { get; }
Parameters
System.String sheetName

Property Value
Sheet

The sheet.

Workbook

Gets the workbook.

Declaration
public Workbook Workbook { get; }
Property Value
Workbook

The workbook.

Methods

Add(SheetType)

Creates a new sheet of the specified type and adds it to the collection.

Declaration
public Sheet Add(SheetType type)
Parameters
SheetType type

The type of sheet.

Returns
Sheet

The newly created sheet.

Contains(String)

Determines whether the collection contains a sheet with the specified sheet name.

Declaration
public bool Contains(string sheetName)
Parameters
System.String sheetName

The name of the sheet.

Returns
System.Boolean

The value indicating whether a sheet with the specified name is contained in the collection.

Contains(Sheet)

Determines whether the sheet collection contains the specified sheet.

Declaration
public bool Contains(Sheet sheet)
Parameters
Sheet sheet

The sheet.

Returns
System.Boolean

The value indicating whether the sheet is contained in the collection.

GetByName(String)

Gets a sheet by name.

Declaration
public Sheet GetByName(string sheetName)
Parameters
System.String sheetName

The name of the sheet.

Returns
Sheet

The sheet.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<Sheet> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<Sheet>

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

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

Hide()

Hides the active sheet.

Declaration
public void Hide()

Hide(Int32)

Hides a sheet at the specified index.

Declaration
public void Hide(int index)
Parameters
System.Int32 index

The index.

Hide(Sheet)

Hides a specified sheet.

Declaration
public void Hide(Sheet sheet)
Parameters
Sheet sheet

The sheet.

IndexOf(String)

Searches for the specified sheet by name and returns the zero-based index of the first occurrence within the SheetCollection. The search is case insensitive.

Declaration
public int IndexOf(string sheetName)
Parameters
System.String sheetName

The name of the sheet.

Returns
System.Int32

The index of the sheet.

IndexOf(Sheet)

Searches for the specified sheet and returns the zero-based index of the first occurrence within the SheetCollection.

Declaration
public int IndexOf(Sheet sheet)
Parameters
Sheet sheet

The sheet.

Returns
System.Int32

The index of the sheet.

Insert(Int32, SheetType)

Creates a new sheet of the specified type and inserts it in the collection at specified index.

Declaration
public Sheet Insert(int index, SheetType type)
Parameters
System.Int32 index

The index.

SheetType type

The type.

Returns
Sheet

The newly created sheet.

Insert(SheetType)

Creates a new sheet of the specified type and inserts it in the collection at the active sheet index.

Declaration
public Sheet Insert(SheetType type)
Parameters
SheetType type

The type.

Returns
Sheet

The newly created sheet.

Move(Int32, Int32, Int32)

Moves the specified number of items from the specified index to a specified index.

Declaration
public void Move(int fromIndex, int itemCount, int toIndex)
Parameters
System.Int32 fromIndex

From index.

System.Int32 itemCount

The item count.

System.Int32 toIndex

To index.

OnActiveSheetChanged()

Called when [active sheet changed].

Declaration
protected virtual void OnActiveSheetChanged()

OnActiveSheetIndexChanged()

Called when [active sheet index changed].

Declaration
protected virtual void OnActiveSheetIndexChanged()

OnChanged(SheetCollectionChangedEventArgs)

Raises the Changed event.

Declaration
protected virtual void OnChanged(SheetCollectionChangedEventArgs args)
Parameters
SheetCollectionChangedEventArgs args

The SheetCollectionChangedEventArgs instance containing the event data.

Remove()

Removes the active sheet.

Declaration
public void Remove()

Remove(String)

Removes the sheet with the specified name.

Declaration
public bool Remove(string sheetName)
Parameters
System.String sheetName

The name of the sheet.

Returns
System.Boolean

The value indicating whether a sheet with a specified name was found.

Remove(Sheet)

Removes the specified sheet.

Declaration
public bool Remove(Sheet sheet)
Parameters
Sheet sheet

The sheet.

Returns
System.Boolean

The value indicating whether the specified sheet was found.

RemoveAt(Int32)

Removes the sheet at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
System.Int32 index

The index.

Unhide(Int32)

Unhides a sheet at a specified index.

Declaration
public void Unhide(int index)
Parameters
System.Int32 index

The index.

Unhide(Sheet)

Unhides a specified sheet.

Declaration
public void Unhide(Sheet sheet)
Parameters
Sheet sheet

The sheet.

Events

ActiveSheetChanged

Occurs when the active sheet has changed.

Declaration
public event EventHandler ActiveSheetChanged
Event Type
System.EventHandler

ActiveSheetIndexChanged

Occurs when the active sheet index has changed.

Declaration
public event EventHandler ActiveSheetIndexChanged
Event Type
System.EventHandler

Changed

Occurs when the collection has changed.

Declaration
public event EventHandler<SheetCollectionChangedEventArgs> Changed
Event Type
System.EventHandler<SheetCollectionChangedEventArgs>

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Implements
System.Collections.IEnumerable.GetEnumerator()

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.