OleObject

OleObject class

Represents an OleObject in a worksheet.

class OleObject extends Shape;

Constructors

NameDescription
constructor(Shape)Constructs from a parent object convertible to this.

Methods

MethodDescription
isAutoSize()True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.
setIsAutoSize(boolean)True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.
isLink()Returns true if the OleObject links to the file.
set_IsLink(boolean)Returns true if the OleObject links to the file.
getDisplayAsIcon()True if the specified object is displayed as an icon and the image will not be auto changed.
setDisplayAsIcon(boolean)True if the specified object is displayed as an icon and the image will not be auto changed.
getImageData()Represents image of ole object as byte array.
setImageData(number[])Represents image of ole object as byte array.
getObjectData()Represents embedded ole object data as byte array.
setObjectData(number[])Represents embedded ole object data as byte array.
getFullObjectBin()Gets the full embedded ole object binary data in the template file.
getImageSourceFullName()Gets or sets the path and name of the source file for the linked image.
setImageSourceFullName(string)Gets or sets the path and name of the source file for the linked image.
getProgID()Gets or sets the ProgID of the OLE object.
setProgID(string)Gets or sets the ProgID of the OLE object.
getFileFormatType()Gets and sets the file type of the embedded ole object data
setFileFormatType(FileFormatType)Gets and sets the file type of the embedded ole object data
getObjectSourceFullName()Returns the source full name of the source file for the linked OLE object.
setObjectSourceFullName(string)Returns the source full name of the source file for the linked OLE object.
getLabel()Gets and sets the display label of the linked ole object.
setLabel(string)Gets and sets the display label of the linked ole object.
getAutoUpdate()Specifies whether the link to the OleObject is automatically updated or not.
setAutoUpdate(boolean)Specifies whether the link to the OleObject is automatically updated or not.
getAutoLoad()Specifies whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened.
setAutoLoad(boolean)Specifies whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened.
getClassIdentifier()Gets and sets the class identifier of the embedded object. It means which application opens the embedded file.
setClassIdentifier(number[])Gets and sets the class identifier of the embedded object. It means which application opens the embedded file.
getImageType()Gets the image format of the ole object.
setEmbeddedObject(boolean, number[], string, boolean, string)Sets embedded object data.
setEmbeddedObject(boolean, number[], string, boolean, string, boolean)Sets embedded object data.
setNativeSourceFullName(string)Sets the ole native source full file name with path.
getMacroName()Gets and sets the name of macro.
setMacroName(string)Gets and sets the name of macro.
isEquation()Indicates whether the shape only contains an equation.
isSmartArt()Indicates whether the shape is a smart art.
getZOrderPosition()Returns the position of a shape in the z-order.
setZOrderPosition(number)Returns the position of a shape in the z-order.
getName()Gets and sets the name of the shape.
setName(string)Gets and sets the name of the shape.
getAlternativeText()Returns or sets the descriptive (alternative) text string of the Shape object.
setAlternativeText(string)Returns or sets the descriptive (alternative) text string of the Shape object.
getTitle()Specifies the title (caption) of the current shape object.
setTitle(string)Specifies the title (caption) of the current shape object.
getLine()Gets line style
getFill()Returns a FillFormat object that contains fill formatting properties for the specified shape.
getShadowEffect()Represents a Drawing.ShadowEffect object that specifies shadow effect for the chart element or shape.
getReflection()Represents a ReflectionEffect object that specifies reflection effect for the chart element or shape.
getGlow()Represents a GlowEffect object that specifies glow effect for the chart element or shape.
getSoftEdges()Gets and sets the radius of blur to apply to the edges, in unit of points.
setSoftEdges(number)Gets and sets the radius of blur to apply to the edges, in unit of points.
getThreeDFormat()Gets and sets 3d format of the shape.
getFormatPicture()Gets and sets the options of the picture format.
isHidden()Indicates whether the object is visible.
setIsHidden(boolean)Indicates whether the object is visible.
isLockAspectRatio()True means that aspect ratio of the shape is locked.
setIsLockAspectRatio(boolean)True means that aspect ratio of the shape is locked.
isAspectRatioLocked()True means that aspect ratio of the shape is locked.
setIsAspectRatioLocked(boolean)True means that aspect ratio of the shape is locked.
getRotationAngle()Gets and sets the rotation of the shape.
setRotationAngle(number)Gets and sets the rotation of the shape.
getHyperlink()Gets the hyperlink of the shape.
getId()Gets the identifier of this shape.
getSpid()Specifies an optional string identifier that an application can use to identify the particular shape.
getSpt()Specifies an optional number that an application can use to associate the particular shape with a defined shape type.
getWorksheet()Gets the Worksheet object which contains this shape.
isGroup()Indicates whether this shape is a group shape.
isInGroup()Indicates whether the shape is grouped.
isWordArt()Indicates whether this shape is a word art.
getTextEffect()Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.
isLocked()True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.
setIsLocked(boolean)True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.
isPrintable()Indicates whether the object is printable. If False, this shape will not be printed when printing.
setIsPrintable(boolean)Indicates whether the object is printable. If False, this shape will not be printed when printing.
getMsoDrawingType()Gets drawing type.
getAutoShapeType()Gets and sets the auto shape type.
setAutoShapeType(AutoShapeType)Gets and sets the auto shape type.
getAnchorType()Gets and set the type of the shape anchor placeholder.
setAnchorType(ShapeAnchorType)Gets and set the type of the shape anchor placeholder.
getPlacement()Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.
setPlacement(PlacementType)Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.
getUpperLeftRow()Represents the top row index.
setUpperLeftRow(number)Represents the top row index.
getUpperDeltaY()Gets or sets the shape’s vertical offset from its upper left corner row.
setUpperDeltaY(number)Gets or sets the shape’s vertical offset from its upper left corner row.
getUpperLeftColumn()Represents upper left corner column index.
setUpperLeftColumn(number)Represents upper left corner column index.
getUpperDeltaX()Gets or sets the shape’s horizontal offset from its upper left corner column.
setUpperDeltaX(number)Gets or sets the shape’s horizontal offset from its upper left corner column.
getLowerRightRow()Represents lower right corner row index.
setLowerRightRow(number)Represents lower right corner row index.
getLowerDeltaY()Gets or sets the shape’s vertical offset from its lower right corner row.
setLowerDeltaY(number)Gets or sets the shape’s vertical offset from its lower right corner row.
getLowerRightColumn()Represents lower right corner column index.
setLowerRightColumn(number)Represents lower right corner column index.
getLowerDeltaX()Gets or sets the shape’s horizontal offset from its lower right corner column.
setLowerDeltaX(number)Gets or sets the shape’s horizontal offset from its lower right corner column.
getRight()Represents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.
setRight(number)Represents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.
getBottom()Represents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.
setBottom(number)Represents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.
getWidth()Represents the width of shape, in unit of pixels.
setWidth(number)Represents the width of shape, in unit of pixels.
getWidthInch()Represents the width of the shape, in unit of inch.
setWidthInch(number)Represents the width of the shape, in unit of inch.
getWidthPt()Represents the width of the shape, in unit of point.
setWidthPt(number)Represents the width of the shape, in unit of point.
getWidthCM()Represents the width of the shape, in unit of centimeters.
setWidthCM(number)Represents the width of the shape, in unit of centimeters.
getHeight()Represents the height of shape, in unit of pixel.
setHeight(number)Represents the height of shape, in unit of pixel.
getHeightInch()Represents the height of the shape, in unit of inches.
setHeightInch(number)Represents the height of the shape, in unit of inches.
getHeightPt()Represents the height of the shape, in unit of points.
setHeightPt(number)Represents the height of the shape, in unit of points.
getHeightCM()Represents the height of the shape, in unit of centimeters.
setHeightCM(number)Represents the height of the shape, in unit of centimeters.
getLeft()Represents the horizontal offset of shape from its left column, in unit of pixels.
setLeft(number)Represents the horizontal offset of shape from its left column, in unit of pixels.
getLeftInch()Represents the horizontal offset of shape from its left column, in unit of inches.
setLeftInch(number)Represents the horizontal offset of shape from its left column, in unit of inches.
getLeftCM()Represents the horizontal offset of shape from its left column, in unit of centimeters.
setLeftCM(number)Represents the horizontal offset of shape from its left column, in unit of centimeters.
getTop()Represents the vertical offset of shape from its top row, in unit of pixels.
setTop(number)Represents the vertical offset of shape from its top row, in unit of pixels.
getTopInch()Represents the vertical offset of shape from its top row, in unit of inches.
setTopInch(number)Represents the vertical offset of shape from its top row, in unit of inches.
getTopCM()Represents the vertical offset of shape from its top row, in unit of centimeters.
setTopCM(number)Represents the vertical offset of shape from its top row, in unit of centimeters.
getTopToCorner()Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
setTopToCorner(number)Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
getLeftToCorner()Gets and sets the horizonal offset of shape from worksheet left border.
setLeftToCorner(number)Gets and sets the horizonal offset of shape from worksheet left border.
getX()Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
setX(number)Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
getY()Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
setY(number)Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
getWidthScale()Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
setWidthScale(number)Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;
getHeightScale()Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
setHeightScale(number)Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;
getTopInShape()Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.
setTopInShape(number)Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.
getLeftInShape()Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
setLeftInShape(number)Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.
getWidthInShape()Represents the width of the shape, in unit of 1/4000 of the parent shape.
setWidthInShape(number)Represents the width of the shape, in unit of 1/4000 of the parent shape.
getHeightInShape()Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..
setHeightInShape(number)Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..
getGroup()Gets the group shape which contains this shape.
getType()Gets the auto shape type.
getHasLine()Gets and sets the line border of the shape is visible.
setHasLine(boolean)Gets and sets the line border of the shape is visible.
isFilled()Indicates whether the fill format is visible.
setIsFilled(boolean)Indicates whether the fill format is visible.
isFlippedHorizontally()Gets and sets whether shape is horizontally flipped .
setIsFlippedHorizontally(boolean)Gets and sets whether shape is horizontally flipped .
isFlippedVertically()Gets and sets whether shape is vertically flipped .
setIsFlippedVertically(boolean)Gets and sets whether shape is vertically flipped .
getActualLowerRightRow()Get the actual bottom row.
getRelativeToOriginalPictureSize()Indicates whether shape is relative to original picture size.
setRelativeToOriginalPictureSize(boolean)Indicates whether shape is relative to original picture size.
getTextShapeType()Gets and sets the preset text shape type.
setTextShapeType(AutoShapeType)Gets and sets the preset text shape type.
getTextBody()Gets and sets the setting of the shape’s text.
getFont()Represents the font of shape.
setFont(Font)Represents the font of shape.
getTextOptions()Represents the text options of the shape.
setTextOptions(TextOptions)Represents the text options of the shape.
getText()Gets and sets the text of this shape.
setText(string)Gets and sets the text of this shape.
isRichText()Whether or not the text is rich text.
getHtmlText()Gets and sets the html string which contains data and some formats in this textbox.
setHtmlText(string)Gets and sets the html string which contains data and some formats in this textbox.
getTextVerticalOverflow()Gets and sets the text vertical overflow type of the shape which contains text.
setTextVerticalOverflow(TextOverflowType)Gets and sets the text vertical overflow type of the shape which contains text.
getTextHorizontalOverflow()Gets and sets the text horizontal overflow type of the shape which contains text.
setTextHorizontalOverflow(TextOverflowType)Gets and sets the text horizontal overflow type of the shape which contains text.
isTextWrapped()Gets and sets the text wrapped type of the shape which contains text.
setIsTextWrapped(boolean)Gets and sets the text wrapped type of the shape which contains text.
getTextOrientationType()Gets and sets the text orientation type of the shape.
setTextOrientationType(TextOrientationType)Gets and sets the text orientation type of the shape.
getTextHorizontalAlignment()Gets and sets the text horizontal alignment type of the shape.
setTextHorizontalAlignment(TextAlignmentType)Gets and sets the text horizontal alignment type of the shape.
getTextVerticalAlignment()Gets and sets the text vertical alignment type of the shape.
setTextVerticalAlignment(TextAlignmentType)Gets and sets the text vertical alignment type of the shape.
getTextDirection()Gets/Sets the direction of the text flow for this object.
setTextDirection(TextDirectionType)Gets/Sets the direction of the text flow for this object.
getControlData()Gets the data of control.
getActiveXControl()Gets the ActiveX control.
getPaths()Gets the paths of a custom geometric shape.
getGeometry()Gets the geometry
isDecorative()Indicates whether the object is decorative.
setIsDecorative(boolean)Indicates whether the object is decorative.
getResultOfSmartArt()Converting smart art to grouped shapes.
toFrontOrBack(number)Brings the shape to the front or sends the shape to back.
getLockedProperty(ShapeLockType)Gets the value of locked property.
setLockedProperty(ShapeLockType, boolean)Set the locked property.
addHyperlink(string)Adds a hyperlink to the shape.
removeHyperlink()Removes the hyperlink of the shape.
moveToRange(number, number, number, number)Moves the shape to a specified range.
alignTopRightCorner(number, number)Moves the picture to the top-right corner.
toImage(Uint8Array, ImageType)Creates the shape image and saves it to a stream in the specified format.
toImage(string, ImageOrPrintOptions)Saves the shape to a file.
toImage(ImageOrPrintOptions)Saves the shape to a stream.
getLinkedCell(boolean, boolean)Gets the range linked to the control’s value.
setLinkedCell(string, boolean, boolean)Sets the range linked to the control’s value.
getInputRange(boolean, boolean)Gets the range used to fill the control.
setInputRange(string, boolean, boolean)Sets the range used to fill the control.
updateSelectedValue()Update the selected value by the value of the linked cell.
calculateTextSize()Recalculate the text area
formatCharacters(number, number, Font, StyleFlag)Formats some characters with the font setting.
characters(number, number)Returns a Characters object that represents a range of characters within the text.
getRichFormattings()Returns all Characters objects that represents a range of characters within the text .
removeActiveXControl()Remove activeX control.
getActualBox()Get the actual position and size of the shape (after applying rotation, flip, etc.)

constructor(Shape)

Constructs from a parent object convertible to this.

constructor(obj: Shape);

Parameters:

ParameterTypeDescription
objShapeThe parent object.

isAutoSize()

True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.

isAutoSize() : boolean;

setIsAutoSize(boolean)

True indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when the ole object is activated.

setIsAutoSize(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Returns true if the OleObject links to the file.

isLink() : boolean;

Returns true if the OleObject links to the file.

set_IsLink(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getDisplayAsIcon()

True if the specified object is displayed as an icon and the image will not be auto changed.

getDisplayAsIcon() : boolean;

setDisplayAsIcon(boolean)

True if the specified object is displayed as an icon and the image will not be auto changed.

setDisplayAsIcon(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getImageData()

Represents image of ole object as byte array.

getImageData() : number[];

Returns

number[]

setImageData(number[])

Represents image of ole object as byte array.

setImageData(value: number[]) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

getObjectData()

Represents embedded ole object data as byte array.

getObjectData() : number[];

Returns

number[]

setObjectData(number[])

Represents embedded ole object data as byte array.

setObjectData(value: number[]) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

getFullObjectBin()

Gets the full embedded ole object binary data in the template file.

getFullObjectBin() : number[];

Returns

number[]

getImageSourceFullName()

Gets or sets the path and name of the source file for the linked image.

getImageSourceFullName() : string;

Remarks

The default value is an empty string. If SourceFullName is not an empty string, the image is linked. If SourceFullName is not an empty string, but Data is null, then the image is linked and not stored in the file.

setImageSourceFullName(string)

Gets or sets the path and name of the source file for the linked image.

setImageSourceFullName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

The default value is an empty string. If SourceFullName is not an empty string, the image is linked. If SourceFullName is not an empty string, but Data is null, then the image is linked and not stored in the file.

getProgID()

Gets or sets the ProgID of the OLE object.

getProgID() : string;

setProgID(string)

Gets or sets the ProgID of the OLE object.

setProgID(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getFileFormatType()

Gets and sets the file type of the embedded ole object data

getFileFormatType() : FileFormatType;

Returns

FileFormatType

setFileFormatType(FileFormatType)

Gets and sets the file type of the embedded ole object data

setFileFormatType(value: FileFormatType) : void;

Parameters:

ParameterTypeDescription
valueFileFormatTypeThe value to set.

getObjectSourceFullName()

Returns the source full name of the source file for the linked OLE object.

getObjectSourceFullName() : string;

Remarks

Only supports setting the source full name when the file type is OleFileType.Unknown. Such as wav file ,avi file..etc..

setObjectSourceFullName(string)

Returns the source full name of the source file for the linked OLE object.

setObjectSourceFullName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

Remarks

Only supports setting the source full name when the file type is OleFileType.Unknown. Such as wav file ,avi file..etc..

getLabel()

Gets and sets the display label of the linked ole object.

getLabel() : string;

setLabel(string)

Gets and sets the display label of the linked ole object.

setLabel(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getAutoUpdate()

Specifies whether the link to the OleObject is automatically updated or not.

getAutoUpdate() : boolean;

setAutoUpdate(boolean)

Specifies whether the link to the OleObject is automatically updated or not.

setAutoUpdate(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAutoLoad()

Specifies whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened.

getAutoLoad() : boolean;

setAutoLoad(boolean)

Specifies whether the host application for the embedded object shall be called to load the object data automatically when the parent workbook is opened.

setAutoLoad(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getClassIdentifier()

Gets and sets the class identifier of the embedded object. It means which application opens the embedded file.

getClassIdentifier() : number[];

Returns

number[]

setClassIdentifier(number[])

Gets and sets the class identifier of the embedded object. It means which application opens the embedded file.

setClassIdentifier(value: number[]) : void;

Parameters:

ParameterTypeDescription
valuenumber[]The value to set.

getImageType()

Gets the image format of the ole object.

getImageType() : ImageType;

Returns

ImageType

setEmbeddedObject(boolean, number[], string, boolean, string)

Sets embedded object data.

setEmbeddedObject(linkToFile: boolean, objectData: number[], sourceFileName: string, displayAsIcon: boolean, label: string) : void;

Parameters:

ParameterTypeDescription
linkToFilebooleanIndicates whether the object links to the file. If true, the parameter objectData is ignored.
objectDatanumber[]The embedded object data.
sourceFileNamestringThe file name.
displayAsIconbooleanIndicates whether diplaying object as an icon. /// If true, the orginal image data will be covered by icon.
labelstringThe icon label. Only works when displayAsIcon as true.

setEmbeddedObject(boolean, number[], string, boolean, string, boolean)

Sets embedded object data.

setEmbeddedObject(linkToFile: boolean, objectData: number[], sourceFileName: string, displayAsIcon: boolean, label: string, updateIcon: boolean) : void;

Parameters:

ParameterTypeDescription
linkToFilebooleanIndicates whether the object links to the file. If true, the parameter objectData is ignored.
objectDatanumber[]The embedded object data.
sourceFileNamestringThe file name.
displayAsIconbooleanIndicates whether diplaying object as an icon. /// If true, the orginal image data will be covered by icon.
labelstringThe icon label. Only works when displayAsIcon as true.
updateIconbooleanIndicates whether automatically updating icon.

Remarks

As Aspose can update embedd all file icons, so it’s better that you can add correct icon with as false.

setNativeSourceFullName(string)

Sets the ole native source full file name with path.

setNativeSourceFullName(sourceFullName: string) : void;

Parameters:

ParameterTypeDescription
sourceFullNamestringthe ole native source full file name

getMacroName()

Gets and sets the name of macro.

getMacroName() : string;

setMacroName(string)

Gets and sets the name of macro.

setMacroName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isEquation()

Indicates whether the shape only contains an equation.

isEquation() : boolean;

isSmartArt()

Indicates whether the shape is a smart art.

isSmartArt() : boolean;

Remarks

Only for ooxml file.

getZOrderPosition()

Returns the position of a shape in the z-order.

getZOrderPosition() : number;

setZOrderPosition(number)

Returns the position of a shape in the z-order.

setZOrderPosition(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getName()

Gets and sets the name of the shape.

getName() : string;

setName(string)

Gets and sets the name of the shape.

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getAlternativeText()

Returns or sets the descriptive (alternative) text string of the Shape object.

getAlternativeText() : string;

setAlternativeText(string)

Returns or sets the descriptive (alternative) text string of the Shape object.

setAlternativeText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getTitle()

Specifies the title (caption) of the current shape object.

getTitle() : string;

setTitle(string)

Specifies the title (caption) of the current shape object.

setTitle(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getLine()

Gets line style

getLine() : LineFormat;

Returns

LineFormat

getFill()

Returns a FillFormat object that contains fill formatting properties for the specified shape.

getFill() : FillFormat;

Returns

FillFormat

getShadowEffect()

Represents a Drawing.ShadowEffect object that specifies shadow effect for the chart element or shape.

getShadowEffect() : ShadowEffect;

Returns

ShadowEffect

getReflection()

Represents a ReflectionEffect object that specifies reflection effect for the chart element or shape.

getReflection() : ReflectionEffect;

Returns

ReflectionEffect

getGlow()

Represents a GlowEffect object that specifies glow effect for the chart element or shape.

getGlow() : GlowEffect;

Returns

GlowEffect

getSoftEdges()

Gets and sets the radius of blur to apply to the edges, in unit of points.

getSoftEdges() : number;

setSoftEdges(number)

Gets and sets the radius of blur to apply to the edges, in unit of points.

setSoftEdges(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getThreeDFormat()

Gets and sets 3d format of the shape.

getThreeDFormat() : ThreeDFormat;

Returns

ThreeDFormat

getFormatPicture()

Gets and sets the options of the picture format.

getFormatPicture() : MsoFormatPicture;

Returns

MsoFormatPicture

isHidden()

Indicates whether the object is visible.

isHidden() : boolean;

setIsHidden(boolean)

Indicates whether the object is visible.

setIsHidden(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isLockAspectRatio()

True means that aspect ratio of the shape is locked.

isLockAspectRatio() : boolean;

Remarks

Only for pictures and Ole Objects. NOTE: This member is now obsolete. Instead, please use Shape.IsAspectRatioLocked property. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced.

setIsLockAspectRatio(boolean)

True means that aspect ratio of the shape is locked.

setIsLockAspectRatio(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only for pictures and Ole Objects. NOTE: This member is now obsolete. Instead, please use Shape.IsAspectRatioLocked property. This property will be removed 12 months later since July 2024. Aspose apologizes for any inconvenience you may have experienced.

isAspectRatioLocked()

True means that aspect ratio of the shape is locked.

isAspectRatioLocked() : boolean;

Remarks

Only for pictures and Ole Objects.

setIsAspectRatioLocked(boolean)

True means that aspect ratio of the shape is locked.

setIsAspectRatioLocked(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only for pictures and Ole Objects.

getRotationAngle()

Gets and sets the rotation of the shape.

getRotationAngle() : number;

setRotationAngle(number)

Gets and sets the rotation of the shape.

setRotationAngle(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Gets the hyperlink of the shape.

getHyperlink() : Hyperlink;

Returns

Hyperlink

getId()

Gets the identifier of this shape.

getId() : number;

getSpid()

Specifies an optional string identifier that an application can use to identify the particular shape.

getSpid() : string;

getSpt()

Specifies an optional number that an application can use to associate the particular shape with a defined shape type.

getSpt() : number;

getWorksheet()

Gets the Worksheet object which contains this shape.

getWorksheet() : Worksheet;

Returns

Worksheet

isGroup()

Indicates whether this shape is a group shape.

isGroup() : boolean;

isInGroup()

Indicates whether the shape is grouped.

isInGroup() : boolean;

isWordArt()

Indicates whether this shape is a word art.

isWordArt() : boolean;

Remarks

Only for the Legacy Shape of xls file.

getTextEffect()

Returns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Shape objects that represent WordArt.

getTextEffect() : TextEffectFormat;

Returns

TextEffectFormat

isLocked()

True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.

isLocked() : boolean;

setIsLocked(boolean)

True means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the worksheet or objects in the worksheet are protected.

setIsLocked(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isPrintable()

Indicates whether the object is printable. If False, this shape will not be printed when printing.

isPrintable() : boolean;

setIsPrintable(boolean)

Indicates whether the object is printable. If False, this shape will not be printed when printing.

setIsPrintable(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getMsoDrawingType()

Gets drawing type.

getMsoDrawingType() : MsoDrawingType;

Returns

MsoDrawingType

getAutoShapeType()

Gets and sets the auto shape type.

getAutoShapeType() : AutoShapeType;

Returns

AutoShapeType

setAutoShapeType(AutoShapeType)

Gets and sets the auto shape type.

setAutoShapeType(value: AutoShapeType) : void;

Parameters:

ParameterTypeDescription
valueAutoShapeTypeThe value to set.

getAnchorType()

Gets and set the type of the shape anchor placeholder.

getAnchorType() : ShapeAnchorType;

Returns

ShapeAnchorType

setAnchorType(ShapeAnchorType)

Gets and set the type of the shape anchor placeholder.

setAnchorType(value: ShapeAnchorType) : void;

Parameters:

ParameterTypeDescription
valueShapeAnchorTypeThe value to set.

getPlacement()

Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.

getPlacement() : PlacementType;

Returns

PlacementType

setPlacement(PlacementType)

Represents the way the drawing object is attached to the cells below it. The property controls the placement of an object on a worksheet.

setPlacement(value: PlacementType) : void;

Parameters:

ParameterTypeDescription
valuePlacementTypeThe value to set.

getUpperLeftRow()

Represents the top row index.

getUpperLeftRow() : number;

Remarks

If the shape is in the shape or in the group , UpperLeftRow will be ignored.

setUpperLeftRow(number)

Represents the top row index.

setUpperLeftRow(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

If the shape is in the shape or in the group , UpperLeftRow will be ignored.

getUpperDeltaY()

Gets or sets the shape’s vertical offset from its upper left corner row.

getUpperDeltaY() : number;

Remarks

The range of value is 0 to 256.

setUpperDeltaY(number)

Gets or sets the shape’s vertical offset from its upper left corner row.

setUpperDeltaY(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The range of value is 0 to 256.

getUpperLeftColumn()

Represents upper left corner column index.

getUpperLeftColumn() : number;

setUpperLeftColumn(number)

Represents upper left corner column index.

setUpperLeftColumn(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getUpperDeltaX()

Gets or sets the shape’s horizontal offset from its upper left corner column.

getUpperDeltaX() : number;

Remarks

The range of value is 0 to 1024.

setUpperDeltaX(number)

Gets or sets the shape’s horizontal offset from its upper left corner column.

setUpperDeltaX(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The range of value is 0 to 1024.

getLowerRightRow()

Represents lower right corner row index.

getLowerRightRow() : number;

setLowerRightRow(number)

Represents lower right corner row index.

setLowerRightRow(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLowerDeltaY()

Gets or sets the shape’s vertical offset from its lower right corner row.

getLowerDeltaY() : number;

Remarks

The range of value is 0 to 256.

setLowerDeltaY(number)

Gets or sets the shape’s vertical offset from its lower right corner row.

setLowerDeltaY(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The range of value is 0 to 256.

getLowerRightColumn()

Represents lower right corner column index.

getLowerRightColumn() : number;

setLowerRightColumn(number)

Represents lower right corner column index.

setLowerRightColumn(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLowerDeltaX()

Gets or sets the shape’s horizontal offset from its lower right corner column.

getLowerDeltaX() : number;

Remarks

The range of value is 0 to 1024.

setLowerDeltaX(number)

Gets or sets the shape’s horizontal offset from its lower right corner column.

setLowerDeltaX(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The range of value is 0 to 1024.

getRight()

Represents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.

getRight() : number;

setRight(number)

Represents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.

setRight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getBottom()

Represents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.

getBottom() : number;

setBottom(number)

Represents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.

setBottom(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidth()

Represents the width of shape, in unit of pixels.

getWidth() : number;

setWidth(number)

Represents the width of shape, in unit of pixels.

setWidth(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidthInch()

Represents the width of the shape, in unit of inch.

getWidthInch() : number;

setWidthInch(number)

Represents the width of the shape, in unit of inch.

setWidthInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidthPt()

Represents the width of the shape, in unit of point.

getWidthPt() : number;

setWidthPt(number)

Represents the width of the shape, in unit of point.

setWidthPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidthCM()

Represents the width of the shape, in unit of centimeters.

getWidthCM() : number;

setWidthCM(number)

Represents the width of the shape, in unit of centimeters.

setWidthCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeight()

Represents the height of shape, in unit of pixel.

getHeight() : number;

setHeight(number)

Represents the height of shape, in unit of pixel.

setHeight(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeightInch()

Represents the height of the shape, in unit of inches.

getHeightInch() : number;

setHeightInch(number)

Represents the height of the shape, in unit of inches.

setHeightInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeightPt()

Represents the height of the shape, in unit of points.

getHeightPt() : number;

setHeightPt(number)

Represents the height of the shape, in unit of points.

setHeightPt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeightCM()

Represents the height of the shape, in unit of centimeters.

getHeightCM() : number;

setHeightCM(number)

Represents the height of the shape, in unit of centimeters.

setHeightCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeft()

Represents the horizontal offset of shape from its left column, in unit of pixels.

getLeft() : number;

setLeft(number)

Represents the horizontal offset of shape from its left column, in unit of pixels.

setLeft(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftInch()

Represents the horizontal offset of shape from its left column, in unit of inches.

getLeftInch() : number;

setLeftInch(number)

Represents the horizontal offset of shape from its left column, in unit of inches.

setLeftInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftCM()

Represents the horizontal offset of shape from its left column, in unit of centimeters.

getLeftCM() : number;

setLeftCM(number)

Represents the horizontal offset of shape from its left column, in unit of centimeters.

setLeftCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTop()

Represents the vertical offset of shape from its top row, in unit of pixels.

getTop() : number;

Remarks

If the shape is in the chart, represents the vertical offset of shape from its top border.

setTop(number)

Represents the vertical offset of shape from its top row, in unit of pixels.

setTop(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

If the shape is in the chart, represents the vertical offset of shape from its top border.

getTopInch()

Represents the vertical offset of shape from its top row, in unit of inches.

getTopInch() : number;

setTopInch(number)

Represents the vertical offset of shape from its top row, in unit of inches.

setTopInch(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopCM()

Represents the vertical offset of shape from its top row, in unit of centimeters.

getTopCM() : number;

setTopCM(number)

Represents the vertical offset of shape from its top row, in unit of centimeters.

setTopCM(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopToCorner()

Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.

getTopToCorner() : number;

setTopToCorner(number)

Gets and sets the vertical offset of shape from worksheet top border, in unit of pixels.

setTopToCorner(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getLeftToCorner()

Gets and sets the horizonal offset of shape from worksheet left border.

getLeftToCorner() : number;

setLeftToCorner(number)

Gets and sets the horizonal offset of shape from worksheet left border.

setLeftToCorner(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getX()

Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.

getX() : number;

setX(number)

Gets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.

setX(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getY()

Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.

getY() : number;

setY(number)

Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels.

setY(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getWidthScale()

Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;

getWidthScale() : number;

setWidthScale(number)

Gets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthScale property only returns 100;

setWidthScale(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getHeightScale()

Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;

getHeightScale() : number;

setHeightScale(number)

Gets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the HeightScale property only returns 100;

setHeightScale(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getTopInShape()

Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.

getTopInShape() : number;

Remarks

Only Applies when this shape in the group or chart.

setTopInShape(number)

Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape.

setTopInShape(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Only Applies when this shape in the group or chart.

getLeftInShape()

Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.

getLeftInShape() : number;

Remarks

Only Applies when this shape in the group or chart.

setLeftInShape(number)

Represents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape.

setLeftInShape(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Only Applies when this shape in the group or chart.

getWidthInShape()

Represents the width of the shape, in unit of 1/4000 of the parent shape.

getWidthInShape() : number;

Remarks

Only Applies when this shape in the group or chart.

setWidthInShape(number)

Represents the width of the shape, in unit of 1/4000 of the parent shape.

setWidthInShape(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Only Applies when this shape in the group or chart.

getHeightInShape()

Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..

getHeightInShape() : number;

Remarks

Only Applies when this shape in the group or chart.

setHeightInShape(number)

Represents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the parent shape..

setHeightInShape(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

Only Applies when this shape in the group or chart.

getGroup()

Gets the group shape which contains this shape.

getGroup() : GroupShape;

Returns

GroupShape

getType()

Gets the auto shape type.

getType() : AutoShapeType;

Returns

AutoShapeType

getHasLine()

Gets and sets the line border of the shape is visible.

getHasLine() : boolean;

setHasLine(boolean)

Gets and sets the line border of the shape is visible.

setHasLine(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isFilled()

Indicates whether the fill format is visible.

isFilled() : boolean;

setIsFilled(boolean)

Indicates whether the fill format is visible.

setIsFilled(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isFlippedHorizontally()

Gets and sets whether shape is horizontally flipped .

isFlippedHorizontally() : boolean;

setIsFlippedHorizontally(boolean)

Gets and sets whether shape is horizontally flipped .

setIsFlippedHorizontally(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isFlippedVertically()

Gets and sets whether shape is vertically flipped .

isFlippedVertically() : boolean;

setIsFlippedVertically(boolean)

Gets and sets whether shape is vertically flipped .

setIsFlippedVertically(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getActualLowerRightRow()

Get the actual bottom row.

getActualLowerRightRow() : number;

getRelativeToOriginalPictureSize()

Indicates whether shape is relative to original picture size.

getRelativeToOriginalPictureSize() : boolean;

setRelativeToOriginalPictureSize(boolean)

Indicates whether shape is relative to original picture size.

setRelativeToOriginalPictureSize(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTextShapeType()

Gets and sets the preset text shape type.

getTextShapeType() : AutoShapeType;

Returns

AutoShapeType

setTextShapeType(AutoShapeType)

Gets and sets the preset text shape type.

setTextShapeType(value: AutoShapeType) : void;

Parameters:

ParameterTypeDescription
valueAutoShapeTypeThe value to set.

getTextBody()

Gets and sets the setting of the shape’s text.

getTextBody() : FontSettingCollection;

Returns

FontSettingCollection

getFont()

Represents the font of shape.

getFont() : Font;

Returns

Font

setFont(Font)

Represents the font of shape.

setFont(value: Font) : void;

Parameters:

ParameterTypeDescription
valueFontThe value to set.

getTextOptions()

Represents the text options of the shape.

getTextOptions() : TextOptions;

Returns

TextOptions

setTextOptions(TextOptions)

Represents the text options of the shape.

setTextOptions(value: TextOptions) : void;

Parameters:

ParameterTypeDescription
valueTextOptionsThe value to set.

getText()

Gets and sets the text of this shape.

getText() : string;

setText(string)

Gets and sets the text of this shape.

setText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

isRichText()

Whether or not the text is rich text.

isRichText() : boolean;

getHtmlText()

Gets and sets the html string which contains data and some formats in this textbox.

getHtmlText() : string;

setHtmlText(string)

Gets and sets the html string which contains data and some formats in this textbox.

setHtmlText(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getTextVerticalOverflow()

Gets and sets the text vertical overflow type of the shape which contains text.

getTextVerticalOverflow() : TextOverflowType;

Returns

TextOverflowType

setTextVerticalOverflow(TextOverflowType)

Gets and sets the text vertical overflow type of the shape which contains text.

setTextVerticalOverflow(value: TextOverflowType) : void;

Parameters:

ParameterTypeDescription
valueTextOverflowTypeThe value to set.

getTextHorizontalOverflow()

Gets and sets the text horizontal overflow type of the shape which contains text.

getTextHorizontalOverflow() : TextOverflowType;

Returns

TextOverflowType

setTextHorizontalOverflow(TextOverflowType)

Gets and sets the text horizontal overflow type of the shape which contains text.

setTextHorizontalOverflow(value: TextOverflowType) : void;

Parameters:

ParameterTypeDescription
valueTextOverflowTypeThe value to set.

isTextWrapped()

Gets and sets the text wrapped type of the shape which contains text.

isTextWrapped() : boolean;

setIsTextWrapped(boolean)

Gets and sets the text wrapped type of the shape which contains text.

setIsTextWrapped(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTextOrientationType()

Gets and sets the text orientation type of the shape.

getTextOrientationType() : TextOrientationType;

Returns

TextOrientationType

setTextOrientationType(TextOrientationType)

Gets and sets the text orientation type of the shape.

setTextOrientationType(value: TextOrientationType) : void;

Parameters:

ParameterTypeDescription
valueTextOrientationTypeThe value to set.

getTextHorizontalAlignment()

Gets and sets the text horizontal alignment type of the shape.

getTextHorizontalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setTextHorizontalAlignment(TextAlignmentType)

Gets and sets the text horizontal alignment type of the shape.

setTextHorizontalAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

getTextVerticalAlignment()

Gets and sets the text vertical alignment type of the shape.

getTextVerticalAlignment() : TextAlignmentType;

Returns

TextAlignmentType

setTextVerticalAlignment(TextAlignmentType)

Gets and sets the text vertical alignment type of the shape.

setTextVerticalAlignment(value: TextAlignmentType) : void;

Parameters:

ParameterTypeDescription
valueTextAlignmentTypeThe value to set.

getTextDirection()

Gets/Sets the direction of the text flow for this object.

getTextDirection() : TextDirectionType;

Returns

TextDirectionType

setTextDirection(TextDirectionType)

Gets/Sets the direction of the text flow for this object.

setTextDirection(value: TextDirectionType) : void;

Parameters:

ParameterTypeDescription
valueTextDirectionTypeThe value to set.

getControlData()

Gets the data of control.

getControlData() : number[];

Returns

number[]

getActiveXControl()

Gets the ActiveX control.

getActiveXControl() : ActiveXControl;

Returns

ActiveXControl

getPaths()

Gets the paths of a custom geometric shape.

getPaths() : ShapePathCollection;

Returns

ShapePathCollection

getGeometry()

Gets the geometry

getGeometry() : Geometry;

Returns

Geometry

isDecorative()

Indicates whether the object is decorative.

isDecorative() : boolean;

setIsDecorative(boolean)

Indicates whether the object is decorative.

setIsDecorative(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getResultOfSmartArt()

Converting smart art to grouped shapes.

getResultOfSmartArt() : GroupShape;

Returns

GroupShape

toFrontOrBack(number)

Brings the shape to the front or sends the shape to back.

toFrontOrBack(orders: number) : void;

Parameters:

ParameterTypeDescription
ordersnumberIf it’s less than zero, sets the shape to back. /// If it’s greater than zero, brings the shape to front.

getLockedProperty(ShapeLockType)

Gets the value of locked property.

getLockedProperty(type: ShapeLockType) : boolean;

Parameters:

ParameterTypeDescription
typeShapeLockTypeThe type of the shape locked property.

Returns

Returns the value of locked property.

setLockedProperty(ShapeLockType, boolean)

Set the locked property.

setLockedProperty(type: ShapeLockType, value: boolean) : void;

Parameters:

ParameterTypeDescription
typeShapeLockTypeThe locked type.
valuebooleanThe value of the property.

Adds a hyperlink to the shape.

addHyperlink(address: string) : Hyperlink;

Parameters:

ParameterTypeDescription
addressstringAddress of the hyperlink.

Returns

Return the new hyperlink object.

Removes the hyperlink of the shape.

removeHyperlink() : void;

moveToRange(number, number, number, number)

Moves the shape to a specified range.

moveToRange(upperLeftRow: number, upperLeftColumn: number, lowerRightRow: number, lowerRightColumn: number) : void;

Parameters:

ParameterTypeDescription
upperLeftRownumberUpper left row index.
upperLeftColumnnumberUpper left column index.
lowerRightRownumberLower right row index
lowerRightColumnnumberLower right column index

alignTopRightCorner(number, number)

Moves the picture to the top-right corner.

alignTopRightCorner(topRow: number, rightColumn: number) : void;

Parameters:

ParameterTypeDescription
topRownumberthe row index.
rightColumnnumberthe column index.

toImage(Uint8Array, ImageType)

Creates the shape image and saves it to a stream in the specified format.

toImage(stream: Uint8Array, imageType: ImageType) : void;

Parameters:

ParameterTypeDescription
streamUint8ArrayThe output stream.
imageTypeImageTypeThe type in which to save the image.

Remarks

The following formats are supported: .bmp, .gif, .jpg, .jpeg, .tiff, .emf.

toImage(string, ImageOrPrintOptions)

Saves the shape to a file.

toImage(imageFile: string, options: ImageOrPrintOptions) : void;

Parameters:

ParameterTypeDescription
imageFilestring
optionsImageOrPrintOptions

toImage(ImageOrPrintOptions)

Saves the shape to a stream.

toImage(options: ImageOrPrintOptions) : Uint8Array;

Parameters:

ParameterTypeDescription
optionsImageOrPrintOptions

Returns

The result stream

getLinkedCell(boolean, boolean)

Gets the range linked to the control’s value.

getLinkedCell(isR1C1: boolean, isLocal: boolean) : string;

Parameters:

ParameterTypeDescription
isR1C1booleanWhether the formula needs to be formatted as R1C1.
isLocalbooleanWhether the formula needs to be formatted by locale.

Returns

The range linked to the control’s value.

setLinkedCell(string, boolean, boolean)

Sets the range linked to the control’s value.

setLinkedCell(formula: string, isR1C1: boolean, isLocal: boolean) : void;

Parameters:

ParameterTypeDescription
formulastringThe range linked to the control’s value.
isR1C1booleanWhether the formula needs to be formatted as R1C1.
isLocalbooleanWhether the formula needs to be formatted by locale.

getInputRange(boolean, boolean)

Gets the range used to fill the control.

getInputRange(isR1C1: boolean, isLocal: boolean) : string;

Parameters:

ParameterTypeDescription
isR1C1booleanWhether the formula needs to be formatted as R1C1.
isLocalbooleanWhether the formula needs to be formatted by locale.

Returns

The range used to fill the control.

setInputRange(string, boolean, boolean)

Sets the range used to fill the control.

setInputRange(formula: string, isR1C1: boolean, isLocal: boolean) : void;

Parameters:

ParameterTypeDescription
formulastringThe range used to fill the control.
isR1C1booleanWhether the formula needs to be formatted as R1C1.
isLocalbooleanWhether the formula needs to be formatted by locale.

updateSelectedValue()

Update the selected value by the value of the linked cell.

updateSelectedValue() : void;

calculateTextSize()

Recalculate the text area

calculateTextSize() : number[];

Returns

Text’s Size in an array(width and height).

formatCharacters(number, number, Font, StyleFlag)

Formats some characters with the font setting.

formatCharacters(startIndex: number, length: number, font: Font, flag: StyleFlag) : void;

Parameters:

ParameterTypeDescription
startIndexnumberThe start index.
lengthnumberThe length.
fontFontThe font setting.
flagStyleFlagThe flag of the font setting.

characters(number, number)

Returns a Characters object that represents a range of characters within the text.

characters(startIndex: number, length: number) : FontSetting;

Parameters:

ParameterTypeDescription
startIndexnumberThe index of the start of the character.
lengthnumberThe number of characters.

Returns

Characters object.

Remarks

This method only works on shape with title.

getRichFormattings()

Returns all Characters objects that represents a range of characters within the text .

getRichFormattings() : FontSetting[];

Returns

All Characters objects

removeActiveXControl()

Remove activeX control.

removeActiveXControl() : void;

getActualBox()

Get the actual position and size of the shape (after applying rotation, flip, etc.)

getActualBox() : number[];

Returns

Return the position and size in the order of x, y, w, h

Remarks

Note:The interface is not fully functional, especially the location information is not correct.It is recommended not to use this interface until the function is complete.