Skip to main content
All docs
V25.1
  • Row

    OleObjectCollection.AddEmbeddedOleObject(Single, Single, 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(
        float x,
        float y,
        float width,
        float height,
        byte[] data,
        OleObjectType oleObjectType,
        SpreadsheetImageSource objectRepresentation = null
    )

    Parameters

    Name Type Description
    x Single

    The horizontal coordinate of the OLE object’s image top-left corner, in pixels. The origin point (0,0) is the worksheet’s top-left corner.

    y Single

    The vertical coordinate of the OLE object’s image top-left corner, in pixels. The origin point (0,0) is the worksheet’s top-left corner.

    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.

    Returns

    Type Description
    OleObject

    The created OLE object.

    See Also