menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IWorksheets - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IWorksheets

    A collection of all the Worksheet objects in the specified or active workbook. Each Worksheet object represents a worksheet.

    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.Portable.dll
    Syntax
    public interface IWorksheets : IEnumerable<IWorksheet>, IEnumerable

    Properties

    Application

    Used without an object qualifier, this property returns an Application object that represents the Microsoft Excel application.

    Declaration
    IApplication Application { get; }
    Property Value
    Type
    IApplication

    Count

    Gets the number of objects in the collection. Read-only Long.

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

    Item[Int32]

    Gets a single object from a collection based on specified int value. Read-only.

    Declaration
    IWorksheet this[int Index] { get; }
    Parameters
    Type Name Description
    System.Int32 Index
    Property Value
    Type
    IWorksheet

    Item[String]

    Gets a single object from a collection based on specified string value. Read-only.

    Declaration
    IWorksheet this[string sheetName] { get; }
    Parameters
    Type Name Description
    System.String sheetName
    Property Value
    Type
    IWorksheet

    Parent

    Gets the parent object for the specified object.

    Declaration
    object Parent { get; }
    Property Value
    Type
    System.Object

    UseRangesCache

    Indicates whether all created range objects should be cached or not.

    Declaration
    bool UseRangesCache { get; set; }
    Property Value
    Type
    System.Boolean

    Methods

    AddCopy(IWorksheet)

    Add a copy of the specified worksheet to the worksheet collection.

    Declaration
    IWorksheet AddCopy(IWorksheet sourceSheet)
    Parameters
    Type Name Description
    IWorksheet sourceSheet

    Worksheet to add. It is not necessary; should be worksheet from this collection.

    Returns
    Type Description
    IWorksheet

    Added worksheet.

    AddCopy(IWorksheet, ExcelWorksheetCopyFlags)

    Adds copy of worksheet.

    Declaration
    IWorksheet AddCopy(IWorksheet sheet, ExcelWorksheetCopyFlags flags)
    Parameters
    Type Name Description
    IWorksheet sheet

    Worksheet to copy.

    ExcelWorksheetCopyFlags flags

    Represents copy flags.

    Returns
    Type Description
    IWorksheet

    Copy of worksheet that was added.

    AddCopy(IWorksheets)

    Add a copy of the specified worksheets to the worksheet collection.

    Declaration
    void AddCopy(IWorksheets worksheets)
    Parameters
    Type Name Description
    IWorksheets worksheets

    Worksheets to add.

    AddCopy(IWorksheets, ExcelWorksheetCopyFlags)

    Adding worksheets collection to current workbook.

    Declaration
    void AddCopy(IWorksheets worksheets, ExcelWorksheetCopyFlags flags)
    Parameters
    Type Name Description
    IWorksheets worksheets

    Source worksheets collection.

    ExcelWorksheetCopyFlags flags

    Represents copy option flags.

    AddCopy(Int32)

    Add a copy of the specified worksheet to the worksheet collection.

    Declaration
    IWorksheet AddCopy(int sheetIndex)
    Parameters
    Type Name Description
    System.Int32 sheetIndex

    Index of the workbook that should be copied

    Returns
    Type Description
    IWorksheet

    Returns newly added Worksheet object

    AddCopy(Int32, ExcelWorksheetCopyFlags)

    Add a copy of the specified worksheet to the worksheet collection.

    Declaration
    IWorksheet AddCopy(int sheetIndex, ExcelWorksheetCopyFlags flags)
    Parameters
    Type Name Description
    System.Int32 sheetIndex

    Index of the workbook that should be copied

    ExcelWorksheetCopyFlags flags

    Represents copy options flags.

    Returns
    Type Description
    IWorksheet

    Returns copied sheet.

    AddCopyAfter(IWorksheet)

    Adds copy of sheet to collection after chosen sheet.

    Declaration
    IWorksheet AddCopyAfter(IWorksheet toCopy)
    Parameters
    Type Name Description
    IWorksheet toCopy

    Represents worksheet to copy.

    Returns
    Type Description
    IWorksheet

    Returns copied sheet.

    AddCopyAfter(IWorksheet, IWorksheet)

    Adds copy of sheet to collection before chosen sheet.

    Declaration
    IWorksheet AddCopyAfter(IWorksheet toCopy, IWorksheet sheetBefore)
    Parameters
    Type Name Description
    IWorksheet toCopy

    Represents worksheet to copy.

    IWorksheet sheetBefore

    Represents sheet that, in collection must be before copied sheet.

    Returns
    Type Description
    IWorksheet

    Returns copied sheet.

    AddCopyBefore(IWorksheet)

    Adds copy of sheet to collection before chosen sheet.

    Declaration
    IWorksheet AddCopyBefore(IWorksheet toCopy)
    Parameters
    Type Name Description
    IWorksheet toCopy

    Represents worksheet to copy.

    Returns
    Type Description
    IWorksheet

    Returns copied sheet.

    AddCopyBefore(IWorksheet, IWorksheet)

    Adds copy of sheet to collection before chosen sheet.

    Declaration
    IWorksheet AddCopyBefore(IWorksheet toCopy, IWorksheet sheetAfter)
    Parameters
    Type Name Description
    IWorksheet toCopy

    Represents worksheet to copy.

    IWorksheet sheetAfter

    Represents sheet that, in collection must be after copied sheet.

    Returns
    Type Description
    IWorksheet

    Returns copied sheet.

    Create()

    Create a new worksheet.

    Declaration
    IWorksheet Create()
    Returns
    Type Description
    IWorksheet

    Reference on created worksheet.

    Create(String)

    Create worksheet with specified name.

    Declaration
    IWorksheet Create(string name)
    Parameters
    Type Name Description
    System.String name

    New name of worksheet. Must be unique for collection.

    Returns
    Type Description
    IWorksheet

    Reference on created worksheet.

    FindAll(Boolean)

    Returns the cells of the specified bool value.

    Declaration
    IRange[] FindAll(bool findValue)
    Parameters
    Type Name Description
    System.Boolean findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified bool value, or null if value was not found.

    FindAll(DateTime)

    Returns the cells of the specified DateTime value.

    Declaration
    IRange[] FindAll(DateTime findValue)
    Parameters
    Type Name Description
    System.DateTime findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified DateTime value, or null if value was not found.

    FindAll(Double, ExcelFindType)

    Returns the cells of the specified double value with the specified ExcelFindType.

    Declaration
    IRange[] FindAll(double findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.Double findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange[]

    All found cells, or Null if value was not found.

    FindAll(String, ExcelFindType)

    Returns the cells of the specified string value with the specified ExcelFindType.

    Declaration
    IRange[] FindAll(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified string value, or null if value was not found.

    FindAll(String, ExcelFindType, ExcelFindOptions)

    Returns the cells of the specified string value with the specified ExcelFindType and ExcelFindOptions.

    Declaration
    IRange[] FindAll(string findValue, ExcelFindType flags, ExcelFindOptions findOptions)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    ExcelFindOptions findOptions

    Way to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified string value and specified find options , or null if value was not found.

    FindAll(TimeSpan)

    Returns the cells of the specified TimeSpan value.

    Declaration
    IRange[] FindAll(TimeSpan findValue)
    Parameters
    Type Name Description
    System.TimeSpan findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified TimeSpan value, or null if value was not found.

    FindFirst(Boolean)

    Returns the first occurrence of the specified bool value.

    Declaration
    IRange FindFirst(bool findValue)
    Parameters
    Type Name Description
    System.Boolean findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified bool value, or null if value was not found.

    FindFirst(DateTime)

    Returns the first occurrence of the specified DateTime value.

    Declaration
    IRange FindFirst(DateTime findValue)
    Parameters
    Type Name Description
    System.DateTime findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified DateTime value, or null if value was not found.

    FindFirst(Double, ExcelFindType)

    Returns the first occurrence of the specified double value with the specified ExcelFindType.

    Declaration
    IRange FindFirst(double findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.Double findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified double value, or null if value was not found.

    FindFirst(String, ExcelFindType)

    Returns the first occurrence of the specified string value with the specified ExcelFindType.

    Declaration
    IRange FindFirst(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified string value, or null if value was not found.

    FindFirst(String, ExcelFindType, ExcelFindOptions)

    Returns the first occurrence of the specified string value with the specified ExcelFindType and ExcelFindOptions.

    Declaration
    IRange FindFirst(string findValue, ExcelFindType flags, ExcelFindOptions findOptions)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    ExcelFindOptions findOptions

    Way to search the value.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified string value and specified find options , or null if value was not found.

    FindFirst(TimeSpan)

    Returns the first occurrence of the specified TimeSpan value.

    Declaration
    IRange FindFirst(TimeSpan findValue)
    Parameters
    Type Name Description
    System.TimeSpan findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified TimeSpan value, or null if value was not found.

    Remove(IWorksheet)

    Remove worksheet from collection.

    Declaration
    void Remove(IWorksheet sheet)
    Parameters
    Type Name Description
    IWorksheet sheet

    Reference on worksheet to remove.

    Remove(Int32)

    Removes specified worksheet from the collection.

    Declaration
    void Remove(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the sheet to remove.

    Remove(String)

    Removes specified worksheet from the collection.

    Declaration
    void Remove(string sheetName)
    Parameters
    Type Name Description
    System.String sheetName

    Name of the sheet to remove.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved