Excel.Interfaces.ShapeLoadOptions interface

代表工作表中的一个通用 shape 对象。Represents a generic shape object in the worksheet. 一个形状可以是一个几何形状、一条线、一组形状, 等等。A shape could be a geometric shape, a line, a group of shapes, etc.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

属性

$all
altTextDescription

返回或设置形状对象的可选说明文本。Returns or sets the alternative description text for a Shape object.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

altTextTitle

返回或设置形状对象的可选标题文本。Returns or sets the alternative title text for a Shape object.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

connectionSiteCount

返回此形状上的连接站点数。Returns the number of connection sites on this shape. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

fill

返回此形状的填充格式。Returns the fill formatting of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

geometricShape

返回与形状关联的几何形状。Returns the geometric shape associated with the shape. 如果形状类型不是“GeometricShape”,则会引发错误。An error will be thrown if the shape type is not "GeometricShape".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

geometricShapeType

表示此几何形状的几何形状类型。Represents the geometric shape type of this geometric shape. 有关详细信息,请参阅 Excel.GeometricShapeType。See Excel.GeometricShapeType for details. 如果形状类型不是“GeometricShape”,返回 NULL。Returns null if the shape type is not "GeometricShape".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

group

返回与形状关联的形状组。Returns the shape group associated with the shape. 如果形状类型不是“GroupShape”,则会引发错误。An error will be thrown if the shape type is not "GroupShape".

[API 集: ExcelApi 1.9][ 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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

id

表示形状标识符。Represents the shape identifier. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

image

返回与形状关联的图像。Returns the image associated with the shape. 如果形状类型不是“Image”,则会引发错误。An error will be thrown if the shape type is not "Image".

[API 集: ExcelApi 1.9][ 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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

level

表示指定形状的级别。Represents the level of the specified shape. 例如,级别 0 表示形状不是任何组的一部分,级别 1 表示形状是顶级组的一部分,级别 2 表示形状是顶级子组的一部分。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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

line

返回与形状关联的线条。Returns the line associated with the shape. 如果形状类型不是“Line”,则会引发错误。An error will be thrown if the shape type is not "Line".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

lineFormat

返回此形状的线条格式。Returns the line formatting of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

lockAspectRatio

指定此形状的纵横比是否锁定。Specifies whether or not the aspect ratio of this shape is locked.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

name

表示形状的名称。Represents the name of the shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

parentGroup

表示此形状的父组。Represents the parent group of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

placement

表示对象如何附加到其下方的单元格。Represents how the object is attached to the cells below it.

[API 集: EXCELAPI BETA (仅限预览)][ API set: ExcelApi BETA (PREVIEW ONLY) ]

rotation

表示形状的旋转度数。Represents the rotation, in degrees, of the shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

textFrame

返回此形状的文本框对象。Returns the text frame object of this shape. 只读。Read only.

[API 集: ExcelApi 1.9][ 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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

type

返回此形状的类型。Returns the type of this shape. 有关详细信息,请参阅 Excel.ShapeType。See Excel.ShapeType for details. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

visible

表示此形状的可视性。Represents the visibility of this shape.

[API 集: ExcelApi 1.9][ 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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

zOrderPosition

返回指定形状在 z 顺序中的位置,0 表示顺序堆栈的底部。Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

属性详细信息

$all

$all?: boolean;

属性值

boolean

altTextDescription

返回或设置形状对象的可选说明文本。Returns or sets the alternative description text for a Shape object.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

altTextDescription?: boolean;

属性值

boolean

altTextTitle

返回或设置形状对象的可选标题文本。Returns or sets the alternative title text for a Shape object.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

altTextTitle?: boolean;

属性值

boolean

connectionSiteCount

返回此形状上的连接站点数。Returns the number of connection sites on this shape. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

connectionSiteCount?: boolean;

属性值

boolean

fill

返回此形状的填充格式。Returns the fill formatting of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

fill?: Excel.Interfaces.ShapeFillLoadOptions;

属性值

geometricShape

返回与形状关联的几何形状。Returns the geometric shape associated with the shape. 如果形状类型不是“GeometricShape”,则会引发错误。An error will be thrown if the shape type is not "GeometricShape".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

geometricShape?: Excel.Interfaces.GeometricShapeLoadOptions;

属性值

geometricShapeType

表示此几何形状的几何形状类型。Represents the geometric shape type of this geometric shape. 有关详细信息,请参阅 Excel.GeometricShapeType。See Excel.GeometricShapeType for details. 如果形状类型不是“GeometricShape”,返回 NULL。Returns null if the shape type is not "GeometricShape".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

geometricShapeType?: boolean;

属性值

boolean

group

返回与形状关联的形状组。Returns the shape group associated with the shape. 如果形状类型不是“GroupShape”,则会引发错误。An error will be thrown if the shape type is not "GroupShape".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

group?: Excel.Interfaces.ShapeGroupLoadOptions;

属性值

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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

height?: boolean;

属性值

boolean

id

表示形状标识符。Represents the shape identifier. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

id?: boolean;

属性值

boolean

image

返回与形状关联的图像。Returns the image associated with the shape. 如果形状类型不是“Image”,则会引发错误。An error will be thrown if the shape type is not "Image".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

image?: Excel.Interfaces.ImageLoadOptions;

属性值

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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

left?: boolean;

属性值

boolean

level

表示指定形状的级别。Represents the level of the specified shape. 例如,级别 0 表示形状不是任何组的一部分,级别 1 表示形状是顶级组的一部分,级别 2 表示形状是顶级子组的一部分。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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

level?: boolean;

属性值

boolean

line

返回与形状关联的线条。Returns the line associated with the shape. 如果形状类型不是“Line”,则会引发错误。An error will be thrown if the shape type is not "Line".

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

line?: Excel.Interfaces.LineLoadOptions;

属性值

lineFormat

返回此形状的线条格式。Returns the line formatting of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

lineFormat?: Excel.Interfaces.ShapeLineFormatLoadOptions;

属性值

lockAspectRatio

指定此形状的纵横比是否锁定。Specifies whether or not the aspect ratio of this shape is locked.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

lockAspectRatio?: boolean;

属性值

boolean

name

表示形状的名称。Represents the name of the shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

name?: boolean;

属性值

boolean

parentGroup

表示此形状的父组。Represents the parent group of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

parentGroup?: Excel.Interfaces.ShapeLoadOptions;

属性值

placement

备注

此 API 以预览状态提供给开发者,可能根据我们收到的反馈更改。 请勿在生产环境中使用此 API。

表示对象如何附加到其下方的单元格。Represents how the object is attached to the cells below it.

[API 集: EXCELAPI BETA (仅限预览)][ API set: ExcelApi BETA (PREVIEW ONLY) ]

placement?: boolean;

属性值

boolean

rotation

表示形状的旋转度数。Represents the rotation, in degrees, of the shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

rotation?: boolean;

属性值

boolean

textFrame

返回此形状的文本框对象。Returns the text frame object of this shape. 只读。Read only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

textFrame?: Excel.Interfaces.TextFrameLoadOptions;

属性值

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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

top?: boolean;

属性值

boolean

type

返回此形状的类型。Returns the type of this shape. 有关详细信息,请参阅 Excel.ShapeType。See Excel.ShapeType for details. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

type?: boolean;

属性值

boolean

visible

表示此形状的可视性。Represents the visibility of this shape.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

visible?: boolean;

属性值

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 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

width?: boolean;

属性值

boolean

zOrderPosition

返回指定形状在 z 顺序中的位置,0 表示顺序堆栈的底部。Returns the position of the specified shape in the z-order, with 0 representing the bottom of the order stack. 只读。Read-only.

[API 集: ExcelApi 1.9][ API set: ExcelApi 1.9 ]

zOrderPosition?: boolean;

属性值

boolean