OleObject

OleObject class

Represents an OleObject in a worksheet.

Properties

NameTypeDescription
IsAutoSizebooleanTrue indicates that the size of the ole object will be auto changed as the size of snapshot of the embedded content when
IsLinkbooleanReturns true if the OleObject links to the file.
DisplayAsIconbooleanTrue if the specified object is displayed as an icon and the image will not be auto changed.
ImageDatabyte[]Represents image of ole object as byte array.
ObjectDatabyte[]Represents embedded ole object data as byte array.
FullObjectBinbyte[]Gets the full embedded ole object binary data in the template file.
ImageSourceFullNameStringGets or sets the path and name of the source file for the linked image. The default value is an empty string. If SourceF
ProgIDStringGets or sets the ProgID of the OLE object.
FileFormatTypeintGets and sets the file type of the embedded ole object data The value of the property is FileFormatType integer constant
ObjectSourceFullNameStringReturns the source full name of the source file for the linked OLE object. Only supports setting the source full name wh
LabelStringGets and sets the display label of the linked ole object.
AutoUpdatebooleanSpecifies whether the link to the OleObject is automatically updated or not.
AutoLoadbooleanSpecifies whether the host application for the embedded object shall be called to load the object data automatically whe
ClassIdentifierbyte[]Gets and sets the class identifier of the embedded object. It means which application opens the embedded file.
ImageTypeintGets the image format of the ole object. The value of the property is ImageType integer constant.
MacroNameStringGets and sets the name of macro.
IsEquationbooleanIndicates whether the shape only contains an equation.
IsSmartArtbooleanIndicates whether the shape is a smart art. Only for ooxml file.
ZOrderPositionintReturns the position of a shape in the z-order.
NameStringGets and sets the name of the shape.
AlternativeTextStringReturns or sets the descriptive (alternative) text string of the Shape object.
TitleStringSpecifies the title (caption) of the current shape object.
LineFormatMsoLineFormatReturns a MsoLineFormat object that contains line formatting properties for the specified shape. NOTE: This member is no
FillFormatMsoFillFormatReturns a MsoFillFormat object that contains fill formatting properties for the specified shape. NOTE: This member is no
LineLineFormatGets line style
FillFillFormatReturns a FillFormat object that contains fill formatting properties for the specified shape.
ShadowEffectShadowEffectRepresents a ShadowEffect object that specifies shadow effect for the chart element or shape.
ReflectionReflectionEffectRepresents a ReflectionEffect object that specifies reflection effect for the chart element or shape.
GlowGlowEffectRepresents a GlowEffect object that specifies glow effect for the chart element or shape.
SoftEdgesfloatGets and sets the radius of blur to apply to the edges, in unit of points.
ThreeDFormatThreeDFormatGets and sets 3d format of the shape.
FormatPictureMsoFormatPictureGets and sets the options of the picture format.
IsHiddenbooleanIndicates whether the object is visible.
IsLockAspectRatiobooleanTrue means that aspect ratio of the shape is locked. Only for pictures and Ole Objects. NOTE: This member is now obsolet
IsAspectRatioLockedbooleanTrue means that aspect ratio of the shape is locked. Only for pictures and Ole Objects.
RotationAnglefloatGets and sets the rotation of the shape.
HyperlinkHyperlinkGets the hyperlink of the shape.
IdintGets the identifier of this shape.
SpidStringSpecifies an optional string identifier that an application can use to identify the particular shape.
SptintSpecifies an optional number that an application can use to associate the particular shape with a defined shape type.
WorksheetWorksheetGets the Worksheet object which contains this shape.
IsGroupbooleanIndicates whether this shape is a group shape.
IsInGroupbooleanIndicates whether the shape is grouped.
IsWordArtbooleanIndicates whether this shape is a word art. Only for the Legacy Shape of xls file.
TextEffectTextEffectFormatReturns a TextEffectFormat object that contains text-effect formatting properties for the specified shape. Applies to Sh
IsLockedbooleanTrue means the object can not be modified when the sheet is protected. Note that this value is meaningful only if the wo
IsPrintablebooleanIndicates whether the object is printable. If False, this shape will not be printed when printing.
MsoDrawingTypeintGets drawing type. The value of the property is MsoDrawingType integer constant.
AutoShapeTypeintGets and sets the auto shape type. The value of the property is AutoShapeType integer constant.
AnchorTypeintGets and set the type of the shape anchor placeholder. The value of the property is ShapeAnchorType integer constant.
PlacementintRepresents the way the drawing object is attached to the cells below it. The property controls the placement of an objec
UpperLeftRowintRepresents the top row index. If the shape is in the shape or in the group , UpperLeftRow will be ignored.
UpperDeltaYintGets or sets the shape’s vertical offset from its upper left corner row. The range of value is 0 to 256.
UpperLeftColumnintRepresents upper left corner column index.
UpperDeltaXintGets or sets the shape’s horizontal offset from its upper left corner column. The range of value is 0 to 1024.
LowerRightRowintRepresents lower right corner row index.
LowerDeltaYintGets or sets the shape’s vertical offset from its lower right corner row. The range of value is 0 to 256.
LowerRightColumnintRepresents lower right corner column index.
LowerDeltaXintGets or sets the shape’s horizontal offset from its lower right corner column. The range of value is 0 to 1024.
RightintRepresents the width of the shape’s horizontal offset from its lower right corner column, in unit of pixels.
BottomintRepresents the width of the shape’s vertical offset from its lower bottom corner row, in unit of pixels.
WidthintRepresents the width of shape, in unit of pixels.
WidthInchfloatRepresents the width of the shape, in unit of inch.
WidthPtfloatRepresents the width of the shape, in unit of point.
WidthCMfloatRepresents the width of the shape, in unit of centimeters.
HeightintRepresents the height of shape, in unit of pixel.
HeightInchfloatRepresents the height of the shape, in unit of inches.
HeightPtfloatRepresents the height of the shape, in unit of points.
HeightCMfloatRepresents the height of the shape, in unit of centimeters.
LeftintRepresents the horizontal offset of shape from its left column, in unit of pixels.
LeftInchfloatRepresents the horizontal offset of shape from its left column, in unit of inches.
LeftCMfloatRepresents the horizontal offset of shape from its left column, in unit of centimeters.
TopintRepresents the vertical offset of shape from its top row, in unit of pixels. If the shape is in the chart, represents th
TopInchfloatRepresents the vertical offset of shape from its top row, in unit of inches.
TopCMfloatRepresents the vertical offset of shape from its top row, in unit of centimeters.
TopToCornerintGets and sets the vertical offset of shape from worksheet top border, in unit of pixels.
LeftToCornerintGets and sets the horizonal offset of shape from worksheet left border.
XintGets and sets the horizontal offset of shape from worksheet left border,in unit of pixels.
YintGets and sets the vertical offset of shape from worksheet top border,in unit of pixels.
WidthScaleintGets and sets the width scale, in unit of percent of the original picture width. If the shape is not picture ,the WidthS
HeightScaleintGets and sets the height scale,in unit of percent of the original picture height. If the shape is not picture ,the Heigh
TopInShapeintRepresents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the pare
LeftInShapeintRepresents the horizontal offset of shape from the left border of the parent shape, in unit of 1/4000 of width of the pa
WidthInShapeintRepresents the width of the shape, in unit of 1/4000 of the parent shape. Only Applies when this shape in the group or c
HeightInShapeintRepresents the vertical offset of shape from the top border of the parent shape, in unit of 1/4000 of height of the pare
GroupGroupShapeGets the group shape which contains this shape.
TypeintGets the auto shape type. The value of the property is AutoShapeType integer constant.
HasLinebooleanGets and sets the line border of the shape is visible.
IsFilledbooleanIndicates whether the fill format is visible.
IsFlippedHorizontallybooleanGets and sets whether shape is horizontally flipped .
IsFlippedVerticallybooleanGets and sets whether shape is vertically flipped .
ActualLowerRightRowintGet the actual bottom row.
RelativeToOriginalPictureSizebooleanIndicates whether shape is relative to original picture size.
LinkedCellStringGets or sets the worksheet range linked to the control’s value.
InputRangeStringGets or sets the worksheet range used to fill the specified combo box.
TextShapeTypeintGets and sets the preset text shape type. The value of the property is AutoShapeType integer constant.
TextBodyFontSettingCollectionGets and sets the setting of the shape’s text.
FontFontRepresents the font of shape.
TextOptionsTextOptionsRepresents the text options of the shape.
TextStringGets and sets the text of this shape.
IsRichTextbooleanWhether or not the text is rich text.
HtmlTextStringGets and sets the html string which contains data and some formats in this textbox.
TextVerticalOverflowintGets and sets the text vertical overflow type of the shape which contains text. The value of the property is TextOverflo
TextHorizontalOverflowintGets and sets the text horizontal overflow type of the shape which contains text. The value of the property is TextOverf
IsTextWrappedbooleanGets and sets the text wrapped type of the shape which contains text.
TextOrientationTypeintGets and sets the text orientation type of the shape. The value of the property is TextOrientationType integer constant.
TextHorizontalAlignmentintGets and sets the text horizontal alignment type of the shape. The value of the property is TextAlignmentType integer co
TextVerticalAlignmentintGets and sets the text vertical alignment type of the shape. The value of the property is TextAlignmentType integer cons
TextDirectionintGets/Sets the direction of the text flow for this object. The value of the property is TextDirectionType integer constan
TextBoxOptionsTextBoxOptions
ControlDatabyte[]Gets the data of control.
PathsShapePathCollectionGets the paths of a custom geometric shape.
GeometryGeometryGets the geometry
CreateIdUUIDGets and sets create id for this shape.
IsDecorativebooleanIndicates whether the object is decorative.

Methods

NameDescription
setEmbeddedObjectSets embedded object data.
setNativeSourceFullNameSets the ole native source full file name with path.
getLinkedCellGets the range linked to the control’s value.
setLinkedCellSets the range linked to the control’s value.
getInputRangeGets the range used to fill the control.
setInputRangeSets the range used to fill the control.
updateSelectedValueUpdate the selected value by the value of the linked cell.
calculateTextSizeRecalculate the text area
formatCharactersFormats some characters with the font setting.
charactersReturns a Characters object that represents a range of characters within the text.

This method only works on shape with | | getCharacters | Returns all Characters objects that represents a range of characters within the text .

NOTE: This method is now obsolet | | getRichFormattings | Returns all Characters objects that represents a range of characters within the text . | | removeActiveXControl | Remove activeX control. | | isSameSetting | Returns whether the shape is same. | | getActualBox | Get the actual position and size of the shape (after applying rotation, flip, etc.)

Note:The interface is not fully fun | | fitToTextSize | | | getConnectionPoints | Get the connection points | | toImage | Saves the shape to a file. | | getResultOfSmartArt | Converting smart art to grouped shapes. | | toFrontOrBack | Brings the shape to the front or sends the shape to back. | | getLockedProperty | Gets the value of locked property. | | setLockedProperty | Set the locked property. | | addHyperlink | Adds a hyperlink to the shape. | | removeHyperlink | Removes the hyperlink of the shape. | | moveToRange | Moves the shape to a specified range. | | alignTopRightCorner | Moves the picture to the top-right corner. |

OleObject.IsAutoSize property

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.

Type: boolean

Returns true if the OleObject links to the file.

Type: boolean

OleObject.DisplayAsIcon property

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

Type: boolean

OleObject.ImageData property

Represents image of ole object as byte array.

Type: byte[]

OleObject.ObjectData property

Represents embedded ole object data as byte array.

Type: byte[]

OleObject.FullObjectBin property

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

Type: byte[]

OleObject.ImageSourceFullName property

Gets or sets the path and name of the source file for the linked image. 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.

Type: String

OleObject.ProgID property

Gets or sets the ProgID of the OLE object.

Type: String

OleObject.FileFormatType property

Gets and sets the file type of the embedded ole object data The value of the property is FileFormatType integer constant.

Type: int

OleObject.ObjectSourceFullName property

Returns the source full name of the source file for the linked OLE object. Only supports setting the source full name when the file type is OleFileType.Unknown. Such as wav file ,avi file..etc..

Type: String

OleObject.Label property

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

Type: String

OleObject.AutoUpdate property

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

Type: boolean

OleObject.AutoLoad property

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

Type: boolean

OleObject.ClassIdentifier property

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

Type: byte[]

OleObject.ImageType property

Gets the image format of the ole object. The value of the property is ImageType integer constant.

Type: int

OleObject.MacroName property

Gets and sets the name of macro.

Type: String

OleObject.IsEquation property

Indicates whether the shape only contains an equation.

Type: boolean

OleObject.IsSmartArt property

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

Type: boolean

OleObject.ZOrderPosition property

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

Type: int

OleObject.Name property

Gets and sets the name of the shape.

Type: String

OleObject.AlternativeText property

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

Type: String

OleObject.Title property

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

Type: String

OleObject.LineFormat property

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.

Type: MsoLineFormat

OleObject.FillFormat property

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.

Type: MsoFillFormat

OleObject.Line property

Gets line style

Type: LineFormat

OleObject.Fill property

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

Type: FillFormat

OleObject.ShadowEffect property

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

Type: ShadowEffect

OleObject.Reflection property

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

Type: ReflectionEffect

OleObject.Glow property

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

Type: GlowEffect

OleObject.SoftEdges property

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

Type: float

OleObject.ThreeDFormat property

Gets and sets 3d format of the shape.

Type: ThreeDFormat

OleObject.FormatPicture property

Gets and sets the options of the picture format.

Type: MsoFormatPicture

OleObject.IsHidden property

Indicates whether the object is visible.

Type: boolean

OleObject.IsLockAspectRatio property

True means that aspect ratio of the shape is locked. 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.

Type: boolean

OleObject.IsAspectRatioLocked property

True means that aspect ratio of the shape is locked. Only for pictures and Ole Objects.

Type: boolean

OleObject.RotationAngle property

Gets and sets the rotation of the shape.

Type: float

Gets the hyperlink of the shape.

Type: Hyperlink

OleObject.Id property

Gets the identifier of this shape.

Type: int

OleObject.Spid property

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

Type: String

OleObject.Spt property

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

Type: int

OleObject.Worksheet property

Gets the Worksheet object which contains this shape.

Type: Worksheet

OleObject.IsGroup property

Indicates whether this shape is a group shape.

Type: boolean

OleObject.IsInGroup property

Indicates whether the shape is grouped.

Type: boolean

OleObject.IsWordArt property

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

Type: boolean

OleObject.TextEffect property

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

Type: TextEffectFormat

OleObject.IsLocked property

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.

Type: boolean

OleObject.IsPrintable property

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

Type: boolean

OleObject.MsoDrawingType property

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

Type: int

OleObject.AutoShapeType property

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

Type: int

OleObject.AnchorType property

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

Type: int

OleObject.Placement property

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.

Type: int

OleObject.UpperLeftRow property

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

Type: int

OleObject.UpperDeltaY property

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

Type: int

OleObject.UpperLeftColumn property

Represents upper left corner column index.

Type: int

OleObject.UpperDeltaX property

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

Type: int

OleObject.LowerRightRow property

Represents lower right corner row index.

Type: int

OleObject.LowerDeltaY property

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

Type: int

OleObject.LowerRightColumn property

Represents lower right corner column index.

Type: int

OleObject.LowerDeltaX property

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

Type: int

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

Type: int

OleObject.Bottom property

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

Type: int

OleObject.Width property

Represents the width of shape, in unit of pixels.

Type: int

OleObject.WidthInch property

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

Type: float

OleObject.WidthPt property

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

Type: float

OleObject.WidthCM property

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

Type: float

OleObject.Height property

Represents the height of shape, in unit of pixel.

Type: int

OleObject.HeightInch property

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

Type: float

OleObject.HeightPt property

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

Type: float

OleObject.HeightCM property

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

Type: float

OleObject.Left property

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

Type: int

OleObject.LeftInch property

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

Type: float

OleObject.LeftCM property

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

Type: float

OleObject.Top property

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.

Type: int

OleObject.TopInch property

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

Type: float

OleObject.TopCM property

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

Type: float

OleObject.TopToCorner property

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

Type: int

OleObject.LeftToCorner property

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

Type: int

OleObject.X property

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

Type: int

OleObject.Y property

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

Type: int

OleObject.WidthScale property

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;

Type: int

OleObject.HeightScale property

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;

Type: int

OleObject.TopInShape property

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.

Type: int

OleObject.LeftInShape property

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.

Type: int

OleObject.WidthInShape property

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.

Type: int

OleObject.HeightInShape property

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.

Type: int

OleObject.Group property

Gets the group shape which contains this shape.

Type: GroupShape

OleObject.Type property

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

Type: int

OleObject.HasLine property

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

Type: boolean

OleObject.IsFilled property

Indicates whether the fill format is visible.

Type: boolean

OleObject.IsFlippedHorizontally property

Gets and sets whether shape is horizontally flipped .

Type: boolean

OleObject.IsFlippedVertically property

Gets and sets whether shape is vertically flipped .

Type: boolean

OleObject.ActualLowerRightRow property

Get the actual bottom row.

Type: int

OleObject.RelativeToOriginalPictureSize property

Indicates whether shape is relative to original picture size.

Type: boolean

OleObject.LinkedCell property

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

Type: String

OleObject.InputRange property

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

Type: String

OleObject.TextShapeType property

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

Type: int

OleObject.TextBody property

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

Type: FontSettingCollection

OleObject.Font property

Represents the font of shape.

Type: Font

OleObject.TextOptions property

Represents the text options of the shape.

Type: TextOptions

OleObject.Text property

Gets and sets the text of this shape.

Type: String

OleObject.IsRichText property

Whether or not the text is rich text.

Type: boolean

OleObject.HtmlText property

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

Type: String

OleObject.TextVerticalOverflow property

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

Type: int

OleObject.TextHorizontalOverflow property

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

Type: int

OleObject.IsTextWrapped property

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

Type: boolean

OleObject.TextOrientationType property

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

Type: int

OleObject.TextHorizontalAlignment property

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

Type: int

OleObject.TextVerticalAlignment property

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

Type: int

OleObject.TextDirection property

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

Type: int

OleObject.TextBoxOptions property

Type: TextBoxOptions

OleObject.ControlData property

Gets the data of control.

Type: byte[]

OleObject.Paths property

Gets the paths of a custom geometric shape.

Type: ShapePathCollection

OleObject.Geometry property

Gets the geometry

Type: Geometry

OleObject.CreateId property

Gets and sets create id for this shape.

Type: UUID

OleObject.IsDecorative property

Indicates whether the object is decorative.

Type: boolean

setEmbeddedObject(linkToFile, objectData, sourceFileName, displayAsIcon, label) (1 of 2)

Sets embedded object data.

ParameterTypeDescription
linkToFilebooleanIndicates whether the object links to the file. If true, the parameter objectData is ignored.
objectDatabyte[]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(linkToFile, objectData, sourceFileName, displayAsIcon, label, updateIcon) (2 of 2)

Sets embedded object data.

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

ParameterTypeDescription
linkToFilebooleanIndicates whether the object links to the file. If true, the parameter objectData is ignored.
objectDatabyte[]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.

setNativeSourceFullName(sourceFullName)

Sets the ole native source full file name with path.

ParameterTypeDescription
sourceFullNameStringthe ole native source full file name

getLinkedCell(isR1C1, isLocal)

Gets the range linked to the control’s value.

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(formula, isR1C1, isLocal)

Sets the range linked to the control’s value.

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(isR1C1, isLocal)

Gets the range used to fill the control.

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(formula, isR1C1, isLocal)

Sets the range used to fill the control.

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.

calculateTextSize()

Recalculate the text area

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

formatCharacters(startIndex, length, font, flag)

Formats some characters with the font setting.

ParameterTypeDescription
startIndexintThe start index.
lengthintThe length.
fontFontThe font setting.
flagStyleFlagThe flag of the font setting.

characters(startIndex, length)

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

This method only works on shape with title.

ParameterTypeDescription
startIndexintThe index of the start of the character.
lengthintThe number of characters.

Returns: Characters object.

getCharacters()

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

NOTE: This method is now obsolete. Instead, please use Shape.GetRichFormattings() method. This method will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced.

Returns: All Characters objects

getRichFormattings()

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

Returns: All Characters objects

removeActiveXControl()

Remove activeX control.

isSameSetting(obj)

Returns whether the shape is same.

ParameterTypeDescription
objObject

getActualBox()

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

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.

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

fitToTextSize()

getConnectionPoints()

Get the connection points

Returns: [X,Y] pairs of the connection point. Every item is a float[2] array, [0] represents x and [1] represents y.

toImage(imageFile, options)

Saves the shape to a file.

getResultOfSmartArt()

Converting smart art to grouped shapes.

toFrontOrBack(orders)

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

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

getLockedProperty(type)

Gets the value of locked property.

ParameterTypeDescription
typeintA ShapeLockType value. The type of the shape locked property.

Returns: Returns the value of locked property.

setLockedProperty(type, value)

Set the locked property.

ParameterTypeDescription
typeintA ShapeLockType value. The locked type.
valuebooleanThe value of the property.

Adds a hyperlink to the shape.

ParameterTypeDescription
addressStringAddress of the hyperlink.

Returns: Return the new hyperlink object.

Removes the hyperlink of the shape.

moveToRange(topRow, leftColumn, bottomRow, rightColumn)

Moves the shape to a specified range.

ParameterTypeDescription
upperLeftRowUpper left row index.
upperLeftColumnUpper left column index.
lowerRightRowLower right row index
lowerRightColumnLower right column index

alignTopRightCorner(topRow, rightColumn)

Moves the picture to the top-right corner.

ParameterTypeDescription
topRowintthe row index.
rightColumnintthe column index.