A collection of rows in a worksheet.

Rows in this collection are lazily created (they are only created and added to the collection when they are accessed). If this collection is enumerated, it only enumerates the rows which were already accessed.

See

Hierarchy

Hierarchy

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get maxCount(): number
  • Gets the maximum number of items allowed in this collection.

    Returns number

Methods

  • Parameters

    • other: any

    Returns boolean

  • Inserts one or more rows into the collection Note: An equal number of rows will be removed (i.e. bumped) off the end of the collection.

    Throws

    InvalidOperationException If the operation is not allowed, e.g. if it would cause data to be shifted off the worksheet.

    Throws

    IndexOutOfRangeException If index is negative.

    Throws

    ArgumentOutOfRangeException If count is less than 1.

    Parameters

    • index: number

      the insertion point

    • Optional count: number

      The number of rows to insert

    Returns void

  • Gets the row at the specified index.

    Note: Iterating the collection will not create all rows. It will only iterate the rows which have already been used. To create and iterate all rows in the worksheet use a For loop, iterating from 0 to one less than the maximum row count, and pass in each index to the collection's indexer.

    The row at the specified index.

    Throws

    ArgumentOutOfRangeException 'index' is less than zero.

    Throws

    InvalidOperationException 'index' is greater than or equal to Workbook.maxExcelRowCount or Workbook.maxExcel2007RowCount, depending on the Workbook.currentFormat.

    Parameters

    • a: number

    Returns WorksheetRow

  • Removes one or more rows from the collection

    Throws

    InvalidOperationException If the operation is not allowed, e.g. if it the range intersects with a protected region.

    Throws

    IndexOutOfRangeException If index is negative.

    Throws

    ArgumentOutOfRangeException If count is less than 1.

    Parameters

    • index: number

      the index of the first row to remove point

    • Optional count: number

      The number of rows to remove

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Returns void