Skip to main content
All docs
V25.1
  • Row

    OleObjectCollection.AddEmbeddedOleObject(Cell, Single, Single, Byte[], OleObjectType, SpreadsheetImageSource) Method

    Inserts an embedded OLE object from an array of bytes into the specified position.

    Namespace: DevExpress.Spreadsheet

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

    NuGet Package: DevExpress.Spreadsheet.Core

    Declaration

    OleObject AddEmbeddedOleObject(
        Cell topLeftCell,
        float width,
        float height,
        byte[] data,
        OleObjectType oleObjectType,
        SpreadsheetImageSource objectRepresentation = null
    )

    Parameters

    Name Type Description
    topLeftCell Cell

    A cell to which the OLE object image’s top-left corner is anchored.

    width Single

    The OLE object’s image width.

    height Single

    The OLE object’s image height.

    data Byte[]

    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