Skip to content

Class ExcelOleObject

Namespace: OfficeOpenXml.Drawing.OleObject
Assembly: EPPlus.dll

Class for handling OLE Objects.

public class ExcelOleObject : ExcelDrawing, IDisposable

Inheritance

object ← XmlHelper ← ExcelDrawing ← ExcelOleObject

Implements

IDisposable

Inherited Members

ExcelDrawing.AdjustPositionAndSize()
ExcelDrawing.As
ExcelDrawing.BringToFront()
ExcelDrawing.CellAnchor
ExcelDrawing.ChangeCellAnchor(eEditAs, int, int, int, int)
ExcelDrawing.ChangeCellAnchor(eEditAs)
ExcelDrawing.Copy(ExcelChartStandard, int, int)
ExcelDrawing.Copy(ExcelWorksheet, int, int, int, int)
ExcelDrawing.Description
ExcelDrawing.Dispose()
ExcelDrawing.DrawingType
ExcelDrawing.EditAs
ExcelDrawing.EMU_PER_CM
ExcelDrawing.EMU_PER_MM
ExcelDrawing.EMU_PER_PICA
ExcelDrawing.EMU_PER_PIXEL
ExcelDrawing.EMU_PER_POINT
ExcelDrawing.EMU_PER_US_INCH
ExcelDrawing.From
ExcelDrawing.Group(params ExcelDrawing[])
ExcelDrawing.Hyperlink
ExcelDrawing.Locked
ExcelDrawing.Name
ExcelDrawing.ParentGroup
ExcelDrawing.Position
ExcelDrawing.Print
ExcelDrawing.SendToBack()
ExcelDrawing.SetPosition(int, int, int, int)
ExcelDrawing.SetPosition(int, int)
ExcelDrawing.SetSize(int, int)
ExcelDrawing.SetSize(int)
ExcelDrawing.Size
ExcelDrawing.To
ExcelDrawing.UnGroup(bool)
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Fields

DisplayAsIcon

True: File is displayed as Icon.

public readonly bool DisplayAsIcon

Field Value

bool

True: File is linked. False: File is embedded.

public readonly bool IsExternalLink

Field Value

bool

Properties

DrawingType

Returns the drawing type of this object.

public override eDrawingType DrawingType { get; }

Property Value

eDrawingType

If the Ole object is linked, this property contains the external link object.

public ExcelExternalOleLink ExternalLink { get; }

Property Value

ExcelExternalOleLink

Image

The icon bitmap used to display the ole object. Must be a .bmp or .emf image.

public ExcelImageReadOnly Image { get; }

Property Value

ExcelImageReadOnly

ProgId

The progid for the ole object.

public string ProgId { get; }

Property Value

string

Methods

CreateLinkToEmbeddedPackage()

Creates a link to the embedded Ole Package. Used for accessing contents in embedded xlsx files.

public void CreateLinkToEmbeddedPackage()

Exceptions

InvalidOperationException

GetEmbeddedObjectBytes()

Get the byte array of the embedded OLE object.

public byte[] GetEmbeddedObjectBytes()

Returns

byte[]

The byte array of embedded OLE object.

GetEmbeddedPackage()

Get the workbook of the embedded xlsx object.

public ExcelPackage GetEmbeddedPackage()

Returns

ExcelPackage

Exceptions

NotImplementedException

SetEmbeddedPackage(ExcelPackage)

Overwrites the current package with the new package in Ole Object.

public void SetEmbeddedPackage(ExcelPackage package)

Parameters

package ExcelPackage

The new package.