Skip to main content
All docs
V25.1
  • Row

    OleObjectCollection.AddEmbeddedOleObject(CellRange, Stream, OleObjectType, SpreadsheetImageSource) Method

    Inserts an embedded OLE object from a stream into the specified cell range.

    Namespace: DevExpress.Spreadsheet

    Assembly: DevExpress.Spreadsheet.v25.1.Core.dll

    NuGet Package: DevExpress.Spreadsheet.Core

    Declaration

    OleObject AddEmbeddedOleObject(
        CellRange targetRange,
        Stream stream,
        OleObjectType oleObjectType,
        SpreadsheetImageSource objectRepresentation = null
    )

    Parameters

    Name Type Description
    targetRange CellRange

    A cell range to store the created OLE object.

    stream Stream

    A stream that contain OLE object content in binary format.

    oleObjectType OleObjectType

    OLE object content type.

    Optional Parameters

    Name Type Default Description
    objectRepresentation SpreadsheetImageSource null

    Specifies the image to depict the OLE object on the worksheet. If null, a white boilerplate image is used.

    Returns

    Type Description
    OleObject

    The created OLE object.

    See Also