Excel.Interfaces.ShapeData interface

一个接口,用于描述通过调用 shape.toJSON()返回的数据。

属性

altTextDescription

指定对象的可选说明文本 Shape

altTextTitle

指定对象的可选标题文本 Shape

connectionSiteCount

返回此形状上的连接站点数。

displayName

获取形状的显示名称。 新创建的形状具有已本地化且可能与其 name不匹配的生成名称。 在此方案中,可以使用此 API 获取 UI 中显示的名称。

fill

返回此形状的填充格式。

geometricShapeType

指定此几何形状的几何形状类型。 有关详细信息,请参阅 Excel.GeometricShapeTypenull如果形状类型不是“GeometricShape”,则返回 。

height

指定形状的高度(以磅为单位)。 InvalidArgument使用负值或零作为输入进行设置时引发异常。

id

指定形状标识符。

left

从形状左侧到工作表左侧的距离(以磅为单位)。 InvalidArgument将负值设置为输入时引发异常。

level

指定指定形状的级别。 例如,级别 0 表示形状不是任何组的一部分,级别 1 表示形状是顶级组的一部分,级别 2 表示形状是顶级子组的一部分。

lineFormat

返回此形状的线条格式。

lockAspectRatio

指定是否锁定此形状的纵横比。

name

指定形状的名称。

placement

表示对象如何附加到其下方的单元格。

rotation

指定形状的旋转(以度为单位)。

top

从形状上边缘到工作表上边缘之间的距离(以磅为单位)。 InvalidArgument将负值设置为输入时引发异常。

type

返回此形状的类型。 有关详细信息,请参阅 Excel.ShapeType

visible

指定形状是否可见。

width

指定形状的宽度(以磅为单位)。 InvalidArgument使用负值或零作为输入进行设置时引发异常。

zOrderPosition

返回指定形状在 z 顺序中的位置,0 表示顺序堆栈的底部。

属性详细信息

altTextDescription

指定对象的可选说明文本 Shape

altTextDescription?: string;

属性值

string

注解

[ API 集:ExcelApi 1.9 ]

altTextTitle

指定对象的可选标题文本 Shape

altTextTitle?: string;

属性值

string

注解

[ API 集:ExcelApi 1.9 ]

connectionSiteCount

返回此形状上的连接站点数。

connectionSiteCount?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

displayName

获取形状的显示名称。 新创建的形状具有已本地化且可能与其 name不匹配的生成名称。 在此方案中,可以使用此 API 获取 UI 中显示的名称。

displayName?: string;

属性值

string

注解

[ API 集:ExcelApi 1.15 ]

fill

返回此形状的填充格式。

fill?: Excel.Interfaces.ShapeFillData;

属性值

注解

[ API 集:ExcelApi 1.9 ]

geometricShapeType

指定此几何形状的几何形状类型。 有关详细信息,请参阅 Excel.GeometricShapeTypenull如果形状类型不是“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";

属性值

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"

注解

[ API 集:ExcelApi 1.9 ]

height

指定形状的高度(以磅为单位)。 InvalidArgument使用负值或零作为输入进行设置时引发异常。

height?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

id

指定形状标识符。

id?: string;

属性值

string

注解

[ API 集:ExcelApi 1.9 ]

left

从形状左侧到工作表左侧的距离(以磅为单位)。 InvalidArgument将负值设置为输入时引发异常。

left?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

level

指定指定形状的级别。 例如,级别 0 表示形状不是任何组的一部分,级别 1 表示形状是顶级组的一部分,级别 2 表示形状是顶级子组的一部分。

level?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

lineFormat

返回此形状的线条格式。

lineFormat?: Excel.Interfaces.ShapeLineFormatData;

属性值

注解

[ API 集:ExcelApi 1.9 ]

lockAspectRatio

指定是否锁定此形状的纵横比。

lockAspectRatio?: boolean;

属性值

boolean

注解

[ API 集:ExcelApi 1.9 ]

name

指定形状的名称。

name?: string;

属性值

string

注解

[ API 集:ExcelApi 1.9 ]

placement

表示对象如何附加到其下方的单元格。

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

属性值

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

注解

[ API 集:ExcelApi 1.10 ]

rotation

指定形状的旋转(以度为单位)。

rotation?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

top

从形状上边缘到工作表上边缘之间的距离(以磅为单位)。 InvalidArgument将负值设置为输入时引发异常。

top?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

type

返回此形状的类型。 有关详细信息,请参阅 Excel.ShapeType

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

属性值

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

注解

[ API 集:ExcelApi 1.9 ]

visible

指定形状是否可见。

visible?: boolean;

属性值

boolean

注解

[ API 集:ExcelApi 1.9 ]

width

指定形状的宽度(以磅为单位)。 InvalidArgument使用负值或零作为输入进行设置时引发异常。

width?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]

zOrderPosition

返回指定形状在 z 顺序中的位置,0 表示顺序堆栈的底部。

zOrderPosition?: number;

属性值

number

注解

[ API 集:ExcelApi 1.9 ]