• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class OleShape

Represents an embedded or linked OLE object in a spreadsheet shape.

Inheritance
object
AbstractShape
OleShape
Implements
IWorksheetDrawingObject
ISheetDrawingObject
IDrawingObject
Inherited Members
AbstractShape.EnableLocks()
AbstractShape.SetImage(string)
AbstractShape.WithAdjustments(params long[])
AbstractShape.Id
AbstractShape.Name
AbstractShape.Size
AbstractShape.ParentGroup
AbstractShape.AnchorPosition
AbstractShape.RelativePosition
AbstractShape.Position
AbstractShape.ShapeType
AbstractShape.FlipH
AbstractShape.FlipV
AbstractShape.PrintObject
AbstractShape.Locked
AbstractShape.Locks
AbstractShape.Hidden
AbstractShape.ZOrderPosition
AbstractShape.LockText
AbstractShape.AlternateText
AbstractShape.Tags
AbstractShape.Fill
AbstractShape.Line
AbstractShape.Effects
AbstractShape.HyperLink
AbstractShape.Action
AbstractShape.RotationAngle
AbstractShape.Adjustments
AbstractShape.PolygonPoints
AbstractShape.Sheet
AbstractShape.Positioning
AbstractShape.AnchoredCell
AbstractShape.Worksheet
AbstractShape.OleObject
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet.Drawing
Assembly: DRIT.Spreadsheet.dll
Syntax
public class OleShape : AbstractShape, IWorksheetDrawingObject, ISheetDrawingObject, IDrawingObject

Constructors

OleShape()

Initializes a new OleShape for the supplied workbook data.

Declaration
public OleShape()

Properties

DisplayName

Specifies the display name shown for this OLE object.

Declaration
public string DisplayName { get; set; }
Property Value
Type Description
string

ProgId

Specifies the ProgId of the OLE object (e.g. "Excel.Sheet.12", "Package").

Declaration
public string ProgId { get; set; }
Property Value
Type Description
string

Methods

ClearEmbeddedContent()

Clears the embedded OLE binary payload so that no embedding part is written on the next save. The preview image (if any) is not affected.

Declaration
public void ClearEmbeddedContent()

GetEmbeddedBytes()

Returns the embedded OLE bytes, or null if none have been set.

Declaration
public byte[] GetEmbeddedBytes()
Returns
Type Description
byte[]

GetPreviewBytes()

Returns the preview image bytes, or null if none have been set.

Declaration
public byte[] GetPreviewBytes()
Returns
Type Description
byte[]

SetEmbeddedContent(byte[], string)

Embeds the OLE content from the supplied byte array.

Declaration
public void SetEmbeddedContent(byte[] bytes, string extension)
Parameters
Type Name Description
byte[] bytes

Raw OLE compound document bytes.

string extension

File extension including leading dot (e.g. ".xlsx", ".bin").

SetPreviewImage(byte[], string)

Sets the preview/thumbnail image shown while the OLE object is inactive.

Declaration
public void SetPreviewImage(byte[] bytes, string extension)
Parameters
Type Name Description
byte[] bytes

Image bytes (PNG or JPEG recommended).

string extension

File extension including leading dot (e.g. ".png", ".jpg").

Implements

IWorksheetDrawingObject
ISheetDrawingObject
IDrawingObject
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX