A collection of [[WorksheetMergedCellsRegion]] instances in a [[Worksheet]].

See

  • [[WorksheetMergedCellsRegion]]
  • [[Worksheet.mergedCellsRegions]]

Hierarchy

Hierarchy

  • Base
    • WorksheetMergedCellsRegionCollection

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get count(): number
  • Gets the number of merged cell regions in the collection. The number of merged cell regions in the collection.

    Returns number

Methods

  • Creates new merged cell region and adds it to the collection.

    The new merged cell region will take its value from the first cell containing a value, starting at the top-left and going across then down in the region. The value of all other cells will be lost. Similarly, the new region will initialize its cell format from the first cell containing a non-default cell format.

    Throws

    [[InvalidOperationException]] 'firstRow' is greater than 'lastRow' or 'firstColumn' is greater than 'lastColumn'.

    Throws

    [[ArgumentOutOfRangeException]] Any row or column indices specified are outside the valid row or column ranges.

    Throws

    [[InvalidOperationException]] The new merged cell region overlaps with an existing merged cell region.

    Parameters

    • firstRow: number

      The index of the first row of the merged cell region.

    • firstColumn: number

      The index of the first column of the merged cell region.

    • lastRow: number

      The index of the last row of the merged cell region.

    • lastColumn: number

      The index of the last row column of the merged cell region.

    Returns WorksheetMergedCellsRegion

  • Clears all merged cell regions from the collection.

    When a merged cell region is removed, the top-left cell in the region will retain the region's value. All other cells in the region will have a null value. In addition, all cells in the merged region will have the region's cell format when it is removed.

    Returns void

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Checks if any part of specified region is already a part of a merged cell region.

    Parameters

    • firstRow: number

      The index of the first row of the merged cell region.

    • firstColumn: number

      The index of the first column of the merged cell region.

    • lastRow: number

      The index of the last row of the merged cell region.

    • lastColumn: number

      The index of the last row column of the merged cell region.

    Returns boolean

  • Gets the merged cell region at the specified index. The merged cell region at the specified index.

    Throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to [[count]].

    Parameters

    • a: number

    Returns WorksheetMergedCellsRegion

  • Returns Base

  • Removes the merged cell region at the specified index from the collection.

    When a merged cell region is removed, the top-left cell in the region will retain the region's value. All other cells in the region will have a null value. In addition, all cells in the merged region will have the region's cell format when it is removed.

    Throws

    [[ArgumentOutOfRangeException]] 'index' is less than zero or 'index' is greater than or equal to [[count]].

    Parameters

    • index: number

      The zero-based index of the merged cell region in the collection.

    Returns void

  • Removes the specified merged cell region from the collection.

    When a merged cell region is removed, the top-left cell in the region will retain the region's value. All other cells in the region will have a null value. In addition, all cells in the merged region will have the region's cell format when it is removed.

    Parameters

    Returns boolean

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Returns void