Excel.Interfaces.ShapeData interface

An interface describing the data returned by calling "shape.toJSON()".

Properties

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. Read-only.

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

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 ]

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 ]

lineFormat

Returns the line formatting of this shape. Read-only.

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

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 ]

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

altTextDescription

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

[ API set: ExcelApi 1.9 ]

altTextDescription?: string;

Property Value

string

altTextTitle

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

[ API set: ExcelApi 1.9 ]

altTextTitle?: string;

Property Value

string

connectionSiteCount

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

[ API set: ExcelApi 1.9 ]

connectionSiteCount?: number;

Property Value

number

fill

Returns the fill formatting of this shape. Read-only.

[ API set: ExcelApi 1.9 ]

fill?: Excel.Interfaces.ShapeFillData;

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?: Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus";

Property Value

Excel.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"

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?: number;

Property Value

number

id

Represents the shape identifier. Read-only.

[ API set: ExcelApi 1.9 ]

id?: string;

Property Value

string

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?: number;

Property Value

number

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?: number;

Property Value

number

lineFormat

Returns the line formatting of this shape. Read-only.

[ API set: ExcelApi 1.9 ]

lineFormat?: Excel.Interfaces.ShapeLineFormatData;

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?: string;

Property Value

string

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?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute";

Property Value

Excel.Placement | "TwoCell" | "OneCell" | "Absolute"

rotation

Represents the rotation, in degrees, of the shape.

[ API set: ExcelApi 1.9 ]

rotation?: number;

Property Value

number

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?: number;

Property Value

number

type

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

[ API set: ExcelApi 1.9 ]

type?: Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line";

Property Value

Excel.ShapeType | "Unsupported" | "Image" | "GeometricShape" | "Group" | "Line"

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?: number;

Property Value

number

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?: number;

Property Value

number