Edit

Share via


Excel.Interfaces.ShapeCollectionLoadOptions interface

Represents a collection of all the shapes in the worksheet.

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

For EACH ITEM in the collection: Specifies the alternative description text for a Shape object.

altTextTitle

For EACH ITEM in the collection: Specifies the alternative title text for a Shape object.

connectionSiteCount

For EACH ITEM in the collection: Returns the number of connection sites on this shape.

displayName

For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its name. In this scenario, you can use this API to get the name that is displayed in the UI.

fill

For EACH ITEM in the collection: Returns the fill formatting of this shape.

geometricShape

For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape".

geometricShapeType

For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See Excel.GeometricShapeType for details. Returns null if the shape type is not "GeometricShape".

group

For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape".

height

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

id

For EACH ITEM in the collection: Specifies the shape identifier.

image

For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image".

left

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line".

lineFormat

For EACH ITEM in the collection: Returns the line formatting of this shape.

lockAspectRatio

For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked.

name

For EACH ITEM in the collection: Specifies the name of the shape.

parentGroup

For EACH ITEM in the collection: Specifies the parent group of this shape.

placement

For EACH ITEM in the collection: Represents how the object is attached to the cells below it.

rotation

For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape.

textFrame

For EACH ITEM in the collection: Returns the text frame object of this shape.

top

For EACH ITEM in the collection: 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

For EACH ITEM in the collection: Returns the type of this shape. See Excel.ShapeType for details.

visible

For EACH ITEM in the collection: Specifies if the shape is visible.

width

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

zOrderPosition

For EACH ITEM in the collection: 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).

TypeScript
$all?: boolean;

Property Value

boolean

altTextDescription

For EACH ITEM in the collection: Specifies the alternative description text for a Shape object.

TypeScript
altTextDescription?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

altTextTitle

For EACH ITEM in the collection: Specifies the alternative title text for a Shape object.

TypeScript
altTextTitle?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

connectionSiteCount

For EACH ITEM in the collection: Returns the number of connection sites on this shape.

TypeScript
connectionSiteCount?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

displayName

For EACH ITEM in the collection: Gets the display name of the shape. A newly created shape has a generated name that is localized and may not match its name. In this scenario, you can use this API to get the name that is displayed in the UI.

TypeScript
displayName?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.15 ]

fill

For EACH ITEM in the collection: Returns the fill formatting of this shape.

TypeScript
fill?: Excel.Interfaces.ShapeFillLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

geometricShape

For EACH ITEM in the collection: Returns the geometric shape associated with the shape. An error will be thrown if the shape type is not "GeometricShape".

TypeScript
geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

geometricShapeType

For EACH ITEM in the collection: Specifies the geometric shape type of this geometric shape. See Excel.GeometricShapeType for details. Returns null if the shape type is not "GeometricShape".

TypeScript
geometricShapeType?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

group

For EACH ITEM in the collection: Returns the shape group associated with the shape. An error will be thrown if the shape type is not "GroupShape".

TypeScript
group?: Excel.Interfaces.ShapeGroupLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

height

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

TypeScript
height?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

id

For EACH ITEM in the collection: Specifies the shape identifier.

TypeScript
id?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

image

For EACH ITEM in the collection: Returns the image associated with the shape. An error will be thrown if the shape type is not "Image".

TypeScript
image?: Excel.Interfaces.ImageLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

left

For EACH ITEM in the collection: 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.

TypeScript
left?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

level

For EACH ITEM in the collection: 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.

TypeScript
level?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

line

For EACH ITEM in the collection: Returns the line associated with the shape. An error will be thrown if the shape type is not "Line".

TypeScript
line?: Excel.Interfaces.LineLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

lineFormat

For EACH ITEM in the collection: Returns the line formatting of this shape.

TypeScript
lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

lockAspectRatio

For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked.

TypeScript
lockAspectRatio?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

name

For EACH ITEM in the collection: Specifies the name of the shape.

TypeScript
name?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

parentGroup

For EACH ITEM in the collection: Specifies the parent group of this shape.

TypeScript
parentGroup?: Excel.Interfaces.ShapeLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

placement

For EACH ITEM in the collection: Represents how the object is attached to the cells below it.

TypeScript
placement?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.10 ]

rotation

For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape.

TypeScript
rotation?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

textFrame

For EACH ITEM in the collection: Returns the text frame object of this shape.

TypeScript
textFrame?: Excel.Interfaces.TextFrameLoadOptions;

Property Value

Remarks

[ API set: ExcelApi 1.9 ]

top

For EACH ITEM in the collection: 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.

TypeScript
top?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

type

For EACH ITEM in the collection: Returns the type of this shape. See Excel.ShapeType for details.

TypeScript
type?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

visible

For EACH ITEM in the collection: Specifies if the shape is visible.

TypeScript
visible?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

width

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

TypeScript
width?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]

zOrderPosition

For EACH ITEM in the collection: Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack.

TypeScript
zOrderPosition?: boolean;

Property Value

boolean

Remarks

[ API set: ExcelApi 1.9 ]