Interface SOleObject

All Known Implementing Classes:
OleObjectImpl

public interface SOleObject
Represents an OLE (Object Linking and Embedding) object embedded in a sheet. OLE objects can be embedded documents (e.g., Word, Excel) or linked external files.

Reference: ECMA-376 Part 1, Section 20.3 - Drawing (SpreadsheetML)

Since:
7.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the anchor that positions this OLE object on the sheet.
    byte[]
    Returns the raw binary data of the embedded document.
    Returns the file path for linked OLE objects.
    byte[]
    Returns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.
    Returns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".
    int
    Returns the shape ID associated with this OLE object in the drawing layer.
    boolean
    Returns whether this OLE object is displayed as an icon rather than showing the document preview.
    boolean
    Returns whether this OLE object is linked (rather than embedded).
  • Method Details

    • getProgId

      String getProgId()
      Returns the programmatic identifier of the OLE object, e.g., "Word.Document.12", "Excel.Sheet.12", "Equation.3".
      Returns:
      the ProgID string, or null if not available
    • getShapeId

      int getShapeId()
      Returns the shape ID associated with this OLE object in the drawing layer.
      Returns:
      the shape ID
    • getAnchor

      ViewAnchor getAnchor()
      Returns the anchor that positions this OLE object on the sheet.
      Returns:
      the view anchor
    • getEmbeddedData

      byte[] getEmbeddedData()
      Returns the raw binary data of the embedded document. For linked objects, this returns null.
      Returns:
      the embedded document bytes, or null if linked
    • getPreviewImage

      byte[] getPreviewImage()
      Returns the preview image data (typically EMF or WMF format) used to display the OLE object when the source application is not available.
      Returns:
      the preview image bytes, or null if not available
    • getLinkPath

      String getLinkPath()
      Returns the file path for linked OLE objects. For embedded objects, this returns null.
      Returns:
      the link path, or null if embedded
    • isLinked

      boolean isLinked()
      Returns whether this OLE object is linked (rather than embedded).
      Returns:
      true if linked, false if embedded
    • isDisplayAsIcon

      boolean isDisplayAsIcon()
      Returns whether this OLE object is displayed as an icon rather than showing the document preview.
      Returns:
      true if displayed as icon