Methods

Methods

Adds a hyperlink to the shape.

Parameter

Name Type Optional Description

address

String

 

Address of the hyperlink.

Returns

Hyperlink Return the new hyperlink object.

alignTopRightCorner(topRow, rightColumn)

Moves the picture to the top-right corner.

Parameters

Name Type Optional Description

topRow

Number

 

the row index.

rightColumn

Number

 

the column index.

calculateTextSize() → Array of Number

Recalculate the text area

Returns

Array of Number Text's Size in an array(width and height).

characters(startIndex, length) → FontSetting

Returns a Characters object that represents a range of characters within the text. This method only works on shape with title.

Parameters

Name Type Optional Description

startIndex

Number

 

The index of the start of the character.

length

Number

 

The number of characters.

Returns

FontSetting Characters object.

formatCharacters(startIndex, length, font, flag)

Formats some characters with the font setting.

Parameters

Name Type Optional Description

startIndex

Number

 

The start index.

length

Number

 

The length.

font

Font

 

The font setting.

flag

StyleFlag

 

The flag of the font setting.

formatCharacters(startIndex, length, font)

Formats some characters with the font setting. NOTE: This member is now obsolete. Instead, please use Shape.FormatCharacters(int startIndex, int length, Font font, StyleFlag flag) method. This property will be removed 12 months later since March 2016. Aspose apologizes for any inconvenience you may have experienced.

Parameters

Name Type Optional Description

startIndex

Number

 

The start index.

length

Number

 

The length.

font

Font

 

The font setting.

getActualLowerRightRow()

Get the actual bottom row.

getAlternativeText()

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

getAnchorType()

Gets and set the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.

getAutoShapeType()

Gets the auto shape type. The value of the property is AutoShapeType integer constant.

getBottom()

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

getCharacters() → ArrayList

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

Returns

ArrayList All Characters objects

getConnectionPoints() → Array of Float

Get the connection points

Returns

Array of Float 

getControlData()

Gets the data of control.

getFill()

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

getFillFormat()

Returns a MsoFillFormat object that contains fill formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Fill property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

getFont()

Represents the font of shape.

getFormat()

Represents the setting of the shape's formatting. NOTE: This member is now obsolete. Instead, please use Shape.Fill and Shape.Line properties. This property will be removed 6 months later since August 2016. Aspose apologizes for any inconvenience you may have experienced.

getFormatPicture()

Gets and sets the options of the picture format.

getGeometry()

Gets the geometry

getGlow()

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

getGroup()

Gets the group shape which contains this shape.

getHeight()

Represents the height of shape, in unit of pixel.

getHeightCM()

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

getHeightInch()

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

getHeightInChart()

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.. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.HeightInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

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.. Only Applies when this shape in the group or chart.

getHeightPt()

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

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;

getHtmlText()

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

Gets the hyperlink of the shape.

getId()

Gets the identifier of this shape.

getInputRange()

Gets or sets the worksheet range used to fill the specified combo box.

getInputRange(isR1C1, isLocal) → String

Gets the range used to fill the control.

Parameters

Name Type Optional Description

isR1C1

boolean

 

Whether the formula needs to be formatted as R1C1.

isLocal

boolean

 

Whether the formula needs to be formatted by locale.

Returns

String The range used to fill the control.

getLeft()

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

getLeftCM()

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

getLeftInch()

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

getLeftInChart()

Represents the vertical offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.LeftInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

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. Only Applies when this shape in the group or chart.

getLeftToCorner()

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

getLine()

Gets line style

getLineFormat()

Returns a MsoLineFormat object that contains line formatting properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.Line property. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

getLinkedCell()

Gets or sets the worksheet range linked to the control's value.

getLinkedCell(isR1C1, isLocal) → String

Gets the range linked to the control's value.

Parameters

Name Type Optional Description

isR1C1

boolean

 

Whether the formula needs to be formatted as R1C1.

isLocal

boolean

 

Whether the formula needs to be formatted by locale.

Returns

String The range linked to the control's value.

getLockedProperty(type) → boolean

Gets the value of locked property.

Parameter

Name Type Optional Description

type

Number

 

ShapeLockType

Returns

boolean Returns the value of locked property.

getLowerDeltaX()

Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024.

getLowerDeltaY()

Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256.

getLowerRightColumn()

Represents lower right corner column index.

getLowerRightRow()

Represents lower right corner row index.

getMacroName()

Gets and sets the name of macro.

getMsoDrawingType()

Gets and sets mso drawing type. The value of the property is MsoDrawingType integer constant.

getName()

Gets and sets the name of the shape.

getPaths()

Gets the paths of a custom geometric shape.

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. The value of the property is PlacementType integer constant.

getPositionX()

Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.X property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

getPositionY()

Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.Y property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

getReflection()

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

getRelativeToOriginalPictureSize()

Indicates whether shape is relative to original picture size.

getResultOfSmartArt()

Converting smart art to grouped shapes.

getRight()

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

getRotationAngle()

Gets and sets the rotation of the shape.

getShadow()

Indicates whether the groupbox has shadow.

getShadowEffect()

Represents a object that specifies shadow effect for the chart element or shape. See Also:ShadowEffect

getSoftEdges()

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

getSpid()

Specifies an optional string 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.

getText()

Represents the string in this TextBox object.

getTextBody()

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

getTextDirection()

Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.

getTextEffect()

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

getTextFrame()

Returns a TextFrame object that contains the alignment and anchoring properties for the specified shape. NOTE: This member is now obsolete. Instead, please use Shape.TextBody.TextAlignment property. This property will be removed 12 months later since May 2016. Aspose apologizes for any inconvenience you may have experienced.

getTextHorizontalAlignment()

Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.

getTextHorizontalOverflow()

Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.

getTextOptions()

Represents the text options of the shape.

getTextOrientationType()

Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.

getTextShapeType()

Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.

getTextVerticalAlignment()

Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.

getTextVerticalOverflow()

Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.

getThreeDFormat()

Gets and sets 3d format of the shape.

getTitle()

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

getTop()

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

getTopCM()

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

getTopInch()

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

getTopInChart()

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. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.TopInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

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. Only Applies when this shape in the group or chart.

getTopToCorner()

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

getType()

Gets the auto shape type. The value of the property is AutoShapeType integer constant.

getUpperDeltaX()

Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024.

getUpperDeltaY()

Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256.

getUpperLeftColumn()

Represents upper left corner column index.

getUpperLeftRow()

Represents upper left corner row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored.

getWidth()

Represents the width of shape, in unit of pixels.

getWidthCM()

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

getWidthInch()

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

getWidthInChart()

Represents the width of the shape, in unit of 1/4000 of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.WidthInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

getWidthInShape()

Represents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or chart.

getWidthPt()

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

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;

getWorksheet()

Gets the Worksheet object which contains this shape.

getX()

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.

getZOrderPosition()

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

hasLine()

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

isEquation()

Indicates whether the shape only contains an equation.

isFilled()

Indicates whether the fill format is visible.

isFlippedHorizontally()

Gets and sets whether shape is horizontally flipped .

isFlippedVertically()

Gets and sets whether shape is vertically flipped .

isGroup()

Indicates whether the shape is a group.

isHidden()

Indicates whether the object is visible.

isLockAspectRatio()

True means that don't allow changes in aspect ratio.

isLocked()

True if the object is locked, False if the object can be modified when the sheet is protected.

isPrintable()

True if the object is printable

isRichText()

Whether or not the text is rich text.

isSameSetting(obj) → boolean

Returns whether the shape is same.

Parameter

Name Type Optional Description

obj

Object

 

Returns

boolean 

isSmartArt()

Indicates whether the shape is smart art. Only for ooxml file.

isTextWrapped()

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

isWordArt()

Indicates whether this shape is a word art. Only for the Legacy Shape of xls file.

moveToRange(upperLeftRow, upperLeftColumn, lowerRightRow, lowerRightColumn)

Moves the shape to a specified range.

Parameters

Name Type Optional Description

upperLeftRow

Number

 

Upper left row index.

upperLeftColumn

Number

 

Upper left column index.

lowerRightRow

Number

 

Lower right row index

lowerRightColumn

Number

 

Lower right column index

removeActiveXControl()

Remove activeX control.

Remove the hyperlink of the shape.

setAlternativeText()

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

setAnchorType()

Gets and set the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.

setAutoShapeType()

Gets the auto shape type. The value of the property is AutoShapeType integer constant.

setBottom()

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

setFilled()

Indicates whether the fill format is visible.

setFlippedHorizontally()

Gets and sets whether shape is horizontally flipped .

setFlippedVertically()

Gets and sets whether shape is vertically flipped .

setFont()

Represents the font of shape.

setHasLine()

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

setHeight()

Represents the height of shape, in unit of pixel.

setHeightCM()

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

setHeightInch()

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

setHeightInChart()

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.. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.HeightInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setHeightInShape()

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.. Only Applies when this shape in the group or chart.

setHeightPt()

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

setHeightScale()

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;

setHidden()

Indicates whether the object is visible.

setHtmlText()

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

setInputRange()

Gets or sets the worksheet range used to fill the specified combo box.

setInputRange(formula, isR1C1, isLocal)

Sets the range used to fill the control.

Parameters

Name Type Optional Description

formula

String

 

The range used to fill the control.

isR1C1

boolean

 

Whether the formula needs to be formatted as R1C1.

isLocal

boolean

 

Whether the formula needs to be formatted by locale.

setLeft()

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

setLeftCM()

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

setLeftInch()

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

setLeftInChart()

Represents the vertical offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.LeftInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setLeftInShape()

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. Only Applies when this shape in the group or chart.

setLeftToCorner()

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

setLinkedCell()

Gets or sets the worksheet range linked to the control's value.

setLinkedCell(formula, isR1C1, isLocal)

Sets the range linked to the control's value.

Parameters

Name Type Optional Description

formula

String

 

The range linked to the control's value.

isR1C1

boolean

 

Whether the formula needs to be formatted as R1C1.

isLocal

boolean

 

Whether the formula needs to be formatted by locale.

setLockAspectRatio()

True means that don't allow changes in aspect ratio.

setLocked()

True if the object is locked, False if the object can be modified when the sheet is protected.

setLockedProperty(type, value)

Set the locked property.

Parameters

Name Type Optional Description

type

Number

 

ShapeLockType

value

boolean

 

The value of the property.

setLowerDeltaX()

Gets or sets the shape's horizontal offset from its lower right corner column. The range of value is 0 to 1024.

setLowerDeltaY()

Gets or sets the shape's vertical offset from its lower right corner row. The range of value is 0 to 256.

setLowerRightColumn()

Represents lower right corner column index.

setLowerRightRow()

Represents lower right corner row index.

setMacroName()

Gets and sets the name of macro.

setName()

Gets and sets the name of the shape.

setPlacement()

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

setPositionX()

Gets and sets the horizonal offset of shape from worksheet left border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.X property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setPositionY()

Gets and sets the vertical offset of shape from worksheet top border,in unit of pixels. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.Y property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setPrintable()

True if the object is printable

setRelativeToOriginalPictureSize()

Indicates whether shape is relative to original picture size.

setRight()

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

setRotationAngle()

Gets and sets the rotation of the shape.

setShadow()

Indicates whether the groupbox has shadow.

setSoftEdges()

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

setText()

Represents the string in this TextBox object.

setTextDirection()

Gets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constant.

setTextHorizontalAlignment()

Gets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer constant.

setTextHorizontalOverflow()

Gets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.

setTextOrientationType()

Gets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.

setTextShapeType()

Gets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.

setTextVerticalAlignment()

Gets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer constant.

setTextVerticalOverflow()

Gets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflowType integer constant.

setTextWrapped()

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

setTitle()

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

setTop()

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

setTopCM()

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

setTopInch()

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

setTopInChart()

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. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.TopInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setTopInShape()

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. Only Applies when this shape in the group or chart.

setTopToCorner()

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

setUpperDeltaX()

Gets or sets the shape's horizontal offset from its upper left corner column. The range of value is 0 to 1024.

setUpperDeltaY()

Gets or sets the shape's vertical offset from its upper left corner row. The range of value is 0 to 256.

setUpperLeftColumn()

Represents upper left corner column index.

setUpperLeftRow()

Represents upper left corner row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored.

setWidth()

Represents the width of shape, in unit of pixels.

setWidthCM()

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

setWidthInch()

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

setWidthInChart()

Represents the width of the shape, in unit of 1/4000 of the parent shape. NOTE: This member is now obsolete. Instead, please use Aspose.Cells.Drawing.Shape.WidthInShape property. This property will be removed 12 months later since JANUARY 2012. Aspose apologizes for any inconvenience you may have experienced.

setWidthInShape()

Represents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or chart.

setWidthPt()

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

setWidthScale()

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;

setX()

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

setY()

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

setZOrderPosition()

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

toFrontOrBack(orders)

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

Parameter

Name Type Optional Description

orders

Number

 

If it's less than zero, sets the shape to back. If it's greater than zero, brings the shape to front.

toImage()

Saves the shape to a file.

updateSelectedValue()

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