Excel.Interfaces.ShapeLoadOptions interface

Represents a generic shape object in the worksheet. A shape could be a geometric shape, a line, a group of shapes, etc.

[ API set: ExcelApi 1.9 ]

Properties

$all
altTextDescription

Returns or sets the alternative description text for a Shape object.

[ API set: ExcelApi 1.9 ]

altTextTitle

Returns or sets the alternative title text for a Shape object.

[ API set: ExcelApi 1.9 ]

connectionSiteCount

Returns the number of connection sites on this shape. Read-only.

[ API set: ExcelApi 1.9 ]

fill

Returns the fill formatting of this shape.

[ API set: ExcelApi 1.9 ]

geometricShape

Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape".

[ API set: ExcelApi 1.9 ]

geometricShapeType

Represents the geometric shape type of this geometric shape. See Excel.GeometricShapeType for details. Returns null if the shape type is not "GeometricShape".

[ API set: ExcelApi 1.9 ]

group

Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape".

[ API set: ExcelApi 1.9 ]

height

Represents the height, in points, of the shape. Throws an invalid argument exception when set with a negative value or zero as input.

[ API set: ExcelApi 1.9 ]

id

Represents the shape identifier. Read-only.

[ API set: ExcelApi 1.9 ]

image

Returns the image associated with the shape. An error will be thrown if the shape type is not "Image".

[ API set: ExcelApi 1.9 ]

left

The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an invalid argument exception when set with a negative value as input.

[ API set: ExcelApi 1.9 ]

level

Represents the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level.

[ API set: ExcelApi 1.9 ]

line

Returns the line associated with the shape. An error will be thrown if the shape type is not "Line".

[ API set: ExcelApi 1.9 ]

lineFormat

Returns the line formatting of this shape.

[ API set: ExcelApi 1.9 ]

lockAspectRatio

Specifies whether or not the aspect ratio of this shape is locked.

[ API set: ExcelApi 1.9 ]

name

Represents the name of the shape.

[ API set: ExcelApi 1.9 ]

parentGroup

Represents the parent group of this shape.

[ API set: ExcelApi 1.9 ]

placement

Represents how the object is attached to the cells below it.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

rotation

Represents the rotation, in degrees, of the shape.

[ API set: ExcelApi 1.9 ]

textFrame

Returns the text frame object of this shape. Read only.

[ API set: ExcelApi 1.9 ]

top

The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an invalid argument exception when set with a negative value as input.

[ API set: ExcelApi 1.9 ]

type

Returns the type of this shape. See Excel.ShapeType for details. Read-only.

[ API set: ExcelApi 1.9 ]

visible

Represents the visibility of this shape.

[ API set: ExcelApi 1.9 ]

width

Represents the width, in points, of the shape. Throws an invalid argument exception when set with a negative value or zero as input.

[ API set: ExcelApi 1.9 ]

zOrderPosition

Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. Read-only.

[ API set: ExcelApi 1.9 ]

Property Details

$all

$all?: boolean;

Property Value

boolean

altTextDescription

Returns or sets the alternative description text for a Shape object.

[ API set: ExcelApi 1.9 ]

altTextDescription?: boolean;

Property Value

boolean

altTextTitle

Returns or sets the alternative title text for a Shape object.

[ API set: ExcelApi 1.9 ]

altTextTitle?: boolean;

Property Value

boolean

connectionSiteCount

Returns the number of connection sites on this shape. Read-only.

[ API set: ExcelApi 1.9 ]

connectionSiteCount?: boolean;

Property Value

boolean

fill

Returns the fill formatting of this shape.

[ API set: ExcelApi 1.9 ]

fill?: Excel.Interfaces.ShapeFillLoadOptions;

Property Value

geometricShape

Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape".

[ API set: ExcelApi 1.9 ]

geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions;

Property Value

geometricShapeType

Represents the geometric shape type of this geometric shape. See Excel.GeometricShapeType for details. Returns null if the shape type is not "GeometricShape".

[ API set: ExcelApi 1.9 ]

geometricShapeType?: boolean;

Property Value

boolean

group

Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape".

[ API set: ExcelApi 1.9 ]

group?: Excel.Interfaces.ShapeGroupLoadOptions;

Property Value

height

Represents the height, in points, of the shape. Throws an invalid argument exception when set with a negative value or zero as input.

[ API set: ExcelApi 1.9 ]

height?: boolean;

Property Value

boolean

id

Represents the shape identifier. Read-only.

[ API set: ExcelApi 1.9 ]

id?: boolean;

Property Value

boolean

image

Returns the image associated with the shape. An error will be thrown if the shape type is not "Image".

[ API set: ExcelApi 1.9 ]

image?: Excel.Interfaces.ImageLoadOptions;

Property Value

left

The distance, in points, from the left side of the shape to the left side of the worksheet. Throws an invalid argument exception when set with a negative value as input.

[ API set: ExcelApi 1.9 ]

left?: boolean;

Property Value

boolean

level

Represents the level of the specified shape. For example, a level of 0 means that the shape is not part of any groups, a level of 1 means the shape is part of a top-level group, and a level of 2 means the shape is part of a sub-group of the top level.

[ API set: ExcelApi 1.9 ]

level?: boolean;

Property Value

boolean

line

Returns the line associated with the shape. An error will be thrown if the shape type is not "Line".

[ API set: ExcelApi 1.9 ]

line?: Excel.Interfaces.LineLoadOptions;

Property Value

lineFormat

Returns the line formatting of this shape.

[ API set: ExcelApi 1.9 ]

lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions;

Property Value

lockAspectRatio

Specifies whether or not the aspect ratio of this shape is locked.

[ API set: ExcelApi 1.9 ]

lockAspectRatio?: boolean;

Property Value

boolean

name

Represents the name of the shape.

[ API set: ExcelApi 1.9 ]

name?: boolean;

Property Value

boolean

parentGroup

Represents the parent group of this shape.

[ API set: ExcelApi 1.9 ]

parentGroup?: Excel.Interfaces.ShapeLoadOptions;

Property Value

placement

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents how the object is attached to the cells below it.

[ API set: ExcelApi BETA (PREVIEW ONLY) ]

placement?: boolean;

Property Value

boolean

rotation

Represents the rotation, in degrees, of the shape.

[ API set: ExcelApi 1.9 ]

rotation?: boolean;

Property Value

boolean

textFrame

Returns the text frame object of this shape. Read only.

[ API set: ExcelApi 1.9 ]

textFrame?: Excel.Interfaces.TextFrameLoadOptions;

Property Value

top

The distance, in points, from the top edge of the shape to the top edge of the worksheet. Throws an invalid argument exception when set with a negative value as input.

[ API set: ExcelApi 1.9 ]

top?: boolean;

Property Value

boolean

type

Returns the type of this shape. See Excel.ShapeType for details. Read-only.

[ API set: ExcelApi 1.9 ]

type?: boolean;

Property Value

boolean

visible

Represents the visibility of this shape.

[ API set: ExcelApi 1.9 ]

visible?: boolean;

Property Value

boolean

width

Represents the width, in points, of the shape. Throws an invalid argument exception when set with a negative value or zero as input.

[ API set: ExcelApi 1.9 ]

width?: boolean;

Property Value

boolean

zOrderPosition

Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. Read-only.

[ API set: ExcelApi 1.9 ]

zOrderPosition?: boolean;

Property Value

boolean