Class ExcelOleObject
Class for handling OLE Objects.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OfficeOpenXml.Drawing.OleObject
Assembly: EPPlus.dll
Syntax
public class ExcelOleObject : ExcelDrawing, IDisposable
Fields
DisplayAsIcon
True: File is displayed as Icon.
Declaration
public readonly bool DisplayAsIcon
Field Value
Type | Description |
---|---|
System.Boolean |
IsExternalLink
True: File is linked. False: File is embedded.
Declaration
public readonly bool IsExternalLink
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
DrawingType
Returns the drawing type of this object.
Declaration
public override eDrawingType DrawingType { get; }
Property Value
Type | Description |
---|---|
eDrawingType |
Overrides
ExternalLink
If the Ole object is linked, this property contains the external link object.
Declaration
public ExcelExternalOleLink ExternalLink { get; }
Property Value
Type | Description |
---|---|
ExcelExternalOleLink |
Image
The icon bitmap used to display the ole object. Must be a .bmp or .emf image.
Declaration
public ExcelImageReadOnly Image { get; }
Property Value
Type | Description |
---|---|
ExcelImageReadOnly |
ProgId
The progid for the ole object.
Declaration
public string ProgId { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CreateLinkToEmbeddedPackage()
Creates a link to the embedded Ole Package. Used for accessing contents in embedded xlsx files.
Declaration
public void CreateLinkToEmbeddedPackage()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException |
GetEmbeddedObjectBytes()
Get the byte array of the embedded OLE object.
Declaration
public byte[] GetEmbeddedObjectBytes()
Returns
Type | Description |
---|---|
System.Byte[] | The byte array of embedded OLE object. |
GetEmbeddedPackage()
Get the workbook of the embedded xlsx object.
Declaration
public ExcelPackage GetEmbeddedPackage()
Returns
Type | Description |
---|---|
ExcelPackage |
Exceptions
Type | Condition |
---|---|
System.NotImplementedException |
SetEmbeddedPackage(ExcelPackage)
Overwrites the current package with the new package in Ole Object.
Declaration
public void SetEmbeddedPackage(ExcelPackage package)
Parameters
Type | Name | Description |
---|---|---|
ExcelPackage | package | The new package. |
Implements
System.IDisposable