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. To learn more about the shape object model, read Work with shapes using the Excel JavaScript API.

Remarks

[ API set: ExcelApi 1.9 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

altTextDescription

Specifies the alternative description text for a Shape object.

altTextTitle

Specifies the alternative title text for a Shape object.

connectionSiteCount

Returns the number of connection sites on this shape.

fill

Returns the fill formatting of this shape.

geometricShape

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

geometricShapeType

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

group

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

height

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

id

Specifies the shape identifier.

image

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

left

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

level

Specifies 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.

line

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

lineFormat

Returns the line formatting of this shape.

lockAspectRatio

Specifies if the aspect ratio of this shape is locked.

name

Specifies the name of the shape.

parentGroup

Specifies the parent group of this shape.

rotation

Specifies the rotation, in degrees, of the shape.

textFrame

Returns the text frame object of this shape.

top

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

type

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

visible

Specifies if the shape is visible.

width

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

zOrderPosition

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

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

altTextDescription

Specifies the alternative description text for a Shape object.

altTextDescription?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

altTextTitle

Specifies the alternative title text for a Shape object.

altTextTitle?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

connectionSiteCount

Returns the number of connection sites on this shape.

connectionSiteCount?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

fill

Returns the fill formatting of this shape.

fill?: Excel.Interfaces.ShapeFillLoadOptions;

Property Value

Remarks

[ 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".

geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

geometricShapeType

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

geometricShapeType?: boolean;

Property Value

boolean

Remarks

[ 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".

group?: Excel.Interfaces.ShapeGroupLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

height

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

height?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

id

Specifies the shape identifier.

id?: boolean;

Property Value

boolean

Remarks

[ 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".

image?: Excel.Interfaces.ImageLoadOptions;

Property Value

Remarks

[ 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 InvalidArgument exception when set with a negative value as an input.

left?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

level

Specifies 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.

level?: boolean;

Property Value

boolean

Remarks

[ 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".

line?: Excel.Interfaces.LineLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

lineFormat

Returns the line formatting of this shape.

lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

lockAspectRatio

Specifies if the aspect ratio of this shape is locked.

lockAspectRatio?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

name

Specifies the name of the shape.

name?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

parentGroup

Specifies the parent group of this shape.

parentGroup?: Excel.Interfaces.ShapeLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

rotation

Specifies the rotation, in degrees, of the shape.

rotation?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

textFrame

Returns the text frame object of this shape.

textFrame?: Excel.Interfaces.TextFrameLoadOptions;

Property Value

Remarks

[ 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 InvalidArgument exception when set with a negative value as an input.

top?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

type

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

type?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

visible

Specifies if the shape is visible.

visible?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

width

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

width?: boolean;

Property Value

boolean

Remarks

[ 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.

zOrderPosition?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]