A collection of [[WorksheetShape]] instances in a [[Worksheet]] or [[WorksheetShapeGroup]]. @see@see

WorksheetShapeCollection

new WorksheetShapeCollection(a: IWorksheetShapeOwner): WorksheetShapeCollection

Returns WorksheetShapeCollection

$t: Type

Gets the number of shapes in the collection. The number of shapes in the collection.

get count(): number

Returns number

Adds a predefined shape to the collection with the specified bounds.

add(shapeType: PredefinedShapeType, sheet: Sheet, boundsInTwips: IgRect): WorksheetShape

Parameters

  • shapeType: PredefinedShapeType

    The type of shape to add to the collection.

  • sheet: Sheet

    The [[sheet]] to which the 'boundsInTwips' relate.

  • boundsInTwips: IgRect

    The bounds of the shape on the 'sheet' in twips (1/20th of a point).

Returns WorksheetShape

Adds a chart to the collection with the specified bounds.

addChart(chartType: ChartType, sheet: Sheet, boundsInTwips: IgRect, chartInitializer: object): WorksheetChart

Parameters

  • chartType: ChartType

    The type of chart to add to the collection.

  • sheet: Sheet

    The [[sheet]] to which the 'boundsInTwips' relate.

  • boundsInTwips: IgRect

    The bounds of the shape on the 'sheet' in twips (1/20th of a point).

  • chartInitializer: object

    An optional callback for initializing the chart before it is added to the collection.

Returns WorksheetChart

Clears all shapes from the collection.

clear(): void

Returns void

Determines whether a shape is in the collection.

contains(shape: WorksheetShape): boolean

Parameters

Returns boolean

Gets the shape at the specified index in the collection. The shape at the specified index.

item(a: number): WorksheetShape

Parameters

  • a: number

Returns WorksheetShape

Removes the specified shape from the collection.

remove_1(shape: WorksheetShape): boolean

Parameters

Returns boolean

Removes the shape at the specified index from the collection.

removeAt(index: number): void

Parameters

  • index: number

    The index of the shape to remove from the collection.

Returns void

staticInit(): void

Returns void