An immutable object which represents a linear gradient fill for a cell.

See

IWorksheetCellFormat.fill

Hierarchy

Hierarchy

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get angle(): number
  • Gets the angle, in degrees, of the direction of the linear gradient, going clockwise from the left-to-right direction.

    Returns number

  • get stops(): IList$1<CellFillGradientStop>
  • Gets the read-only collection of gradient stops which describe the color transitions and their positions within the gradient.

    Returns IList$1<CellFillGradientStop>

  • get noColor(): CellFill
  • Gets the default cell fill, which is no background color.

    Returns CellFill

Methods

  • Determines whether the CellFillLinearGradient is equal to the specified object.

    Returns

    True if the object is equal to this instance; False otherwise.

    Parameters

    • obj: any

      The object to test for equality.

    Returns boolean

  • Gets the hash code for the CellFillLinearGradient.

    Returns

    A number which can be used to hash this instance.

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Creates a linear gradient that can be applied to a cell's fill.

    Throws

    ArgumentException 'stops' contains less than two gradient stops. There must be at least two stops to define the gradient.

    See

    CellFillLinearGradient

    Parameters

    • angle: number

      The angle, in degrees, of the direction of the linear gradient, going clockwise from the left-to-right direction.

    • Rest ...stops: CellFillGradientStop[]

      Two or more gradient stops which describe the color transitions and their positions within the gradient.

    Returns CellFillLinearGradient

  • Creates a linear gradient that can be applied to a cell's fill.

    Throws

    ArgumentException 'colorInfo1' or 'colorInfo2' is an automatic or a system color.

    See

    CellFillLinearGradient

    Parameters

    Returns CellFillLinearGradient

  • Creates a linear gradient that can be applied to a cell's fill.

    Throws

    ArgumentException 'color1' or 'color2' are the empty or system colors or have a non-opaque alpha channel.

    See

    CellFillLinearGradient

    Parameters

    • angle: number

      The angle, in degrees, of the direction of the linear gradient, going clockwise from the left-to-right direction.

    • color1: string | Color

      The color at the start of the gradient.

    • color2: string | Color

      The color at the end of the gradient.

    Returns CellFillLinearGradient

  • Creates a rectangular gradient that can be applied to a cell's fill.

    Throws

    ArgumentException 'colorInfo1' or 'colorInfo2' is an automatic or a system color.

    See

    CellFillRectangularGradient

    Parameters

    Returns CellFillRectangularGradient

  • Creates a rectangular gradient that can be applied to a cell's fill.

    The rectangular gradient is defined by specifying an inner rectangle and a set of gradient stops. The gradient goes from the edges of the inner rectangle to the edges of the cell. If the inner rectangle does not have a height or width of 0, the color of the first gradient stop will be filled in the center of the inner rectangle.

    The inner rectangle is defined by the 'left', 'top', 'right', and 'bottom' parameters. They are relative values ranging from 0.0 to 1.0 and they go from the top/left to the bottom/right. So, for example, to specify a gradient that goes out from the center, all values would be 0.5. Or to specify a gradient which goes out from the bottom-left corner of the cell, the following values would be used: left = 0.0, top = 1.0, right = 0.0, bottom = 1.0.

    Throws

    ArgumentOutOfRangeException 'left', 'top', 'right', or 'bottom' are less than 0.0 or greater than 1.0.

    Throws

    ArgumentException 'stops' contains less than two gradient stops. There must be at least two stops to define the gradient.

    See

    CellFillRectangularGradient

    Parameters

    • left: number

      The left edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • top: number

      The top edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • right: number

      The right edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • bottom: number

      The bottom edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • Rest ...stops: CellFillGradientStop[]

      Two or more gradient stops which describe the color transitions and their positions within the gradient.

    Returns CellFillRectangularGradient

  • Creates a rectangular gradient that can be applied to a cell's fill.

    The rectangular gradient is defined by specifying an inner rectangle and a set of gradient stops. The gradient goes from the edges of the inner rectangle to the edges of the cell. If the inner rectangle does not have a height or width of 0, the color of the first gradient stop will be filled in the center of the inner rectangle.

    The inner rectangle is defined by the 'left', 'top', 'right', and 'bottom' parameters. They are relative values ranging from 0.0 to 1.0 and they go from the top/left to the bottom/right. So, for example, to specify a gradient that goes out from the center, all values would be 0.5. Or to specify a gradient which goes out from the bottom-left corner of the cell, the following values would be used: left = 0.0, top = 1.0, right = 0.0, bottom = 1.0.

    Throws

    ArgumentException 'colorInfo1' or 'colorInfo2' is an automatic or a system color.

    Throws

    ArgumentOutOfRangeException 'left', 'top', 'right', or 'bottom' are less than 0.0 or greater than 1.0.

    See

    CellFillRectangularGradient

    Parameters

    • left: number

      The left edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • top: number

      The top edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • right: number

      The right edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • bottom: number

      The bottom edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • colorInfo1: WorkbookColorInfo

      A WorkbookColorInfo which describes the color at the inner rectangle of the gradient.

    • colorInfo2: WorkbookColorInfo

      A WorkbookColorInfo which describes the color at the outer rectangle (cell edges) of the gradient.

    Returns CellFillRectangularGradient

  • Creates a rectangular gradient that can be applied to a cell's fill.

    The rectangular gradient is defined by specifying an inner rectangle and a set of gradient stops. The gradient goes from the edges of the inner rectangle to the edges of the cell. If the inner rectangle does not have a height or width of 0, the color of the first gradient stop will be filled in the center of the inner rectangle.

    The inner rectangle is defined by the 'left', 'top', 'right', and 'bottom' parameters. They are relative values ranging from 0.0 to 1.0 and they go from the top/left to the bottom/right. So, for example, to specify a gradient that goes out from the center, all values would be 0.5. Or to specify a gradient which goes out from the bottom-left corner of the cell, the following values would be used: left = 0.0, top = 1.0, right = 0.0, bottom = 1.0.

    Throws

    ArgumentOutOfRangeException 'left', 'top', 'right', or 'bottom' are less than 0.0 or greater than 1.0.

    Throws

    ArgumentException 'color1' or 'color2' are empty or system colors or have a non-opaque alpha channel.

    See

    CellFillRectangularGradient

    Parameters

    • left: number

      The left edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • top: number

      The top edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • right: number

      The right edge of the inner rectangle of the gradient, ranging from 0.0 (the left of the cell) to 1.0 (the right of the cell).

    • bottom: number

      The bottom edge of the inner rectangle of the gradient, ranging from 0.0 (the top of the cell) to 1.0 (the bottom of the cell).

    • color1: string | Color

      The color at the inner rectangle of the gradient.

    • color2: string | Color

      The color at the outer rectangle (cell edges) of the gradient.

    Returns CellFillRectangularGradient

  • Creates a rectangular gradient that can be applied to a cell's fill.

    Throws

    ArgumentException 'color1' or 'color2' are empty or system colors or have a non-opaque alpha channel.

    See

    CellFillRectangularGradient

    Parameters

    • color1: string | Color

      The color at the inner rectangle (cell center) of the gradient.

    • color2: string | Color

      The color at the outer rectangle (cell edges) of the gradient.

    Returns CellFillRectangularGradient

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean