Excel.Interfaces.ShapeData interface

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

Properties

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.

geometricShapeType

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

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.

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.

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.

placement

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

rotation

Specifies the rotation, in degrees, of the 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

altTextDescription

Specifies the alternative description text for a Shape object.

altTextDescription?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.9 ]

altTextTitle

Specifies the alternative title text for a Shape object.

altTextTitle?: string;

Property Value

string

Remarks

[ API set: ExcelApi 1.9 ]

connectionSiteCount

Returns the number of connection sites on this shape.

connectionSiteCount?: number;

Property Value

number

Remarks

[ API set: ExcelApi 1.9 ]

fill

Returns the fill formatting of this shape.

fill?: Excel.Interfaces.ShapeFillData;

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?: 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"

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

Property Value

number

Remarks

[ API set: ExcelApi 1.9 ]

id

Specifies the shape identifier.

id?: string;

Property Value

string

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

Property Value

number

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

Property Value

number

Remarks

[ API set: ExcelApi 1.9 ]

lineFormat

Returns the line formatting of this shape.

lineFormat?: Excel.Interfaces.ShapeLineFormatData;

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

Property Value

string

Remarks

[ API set: ExcelApi 1.9 ]

placement

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

placement?: Excel.Placement | "TwoCell" | "OneCell" | "Absolute";

Property Value

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

Remarks

[ API set: ExcelApi 1.10 ]

rotation

Specifies the rotation, in degrees, of the shape.

rotation?: number;

Property Value

number

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

Property Value

number

Remarks

[ API set: ExcelApi 1.9 ]

type

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

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

Property Value

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

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

Property Value

number

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

Property Value

number

Remarks

[ API set: ExcelApi 1.9 ]