Back to Devexpress

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

officefileapi-devexpress-dot-spreadsheet-dot-oleobjectcollection-dot-addembeddedoleobject-x28-cell-single-single-byte-oleobjecttype-spreadsheetimagesource-x29.md

latest2.9 KB
Original Source

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.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
OleObject AddEmbeddedOleObject(
    Cell topLeftCell,
    float width,
    float height,
    byte[] data,
    OleObjectType oleObjectType,
    SpreadsheetImageSource objectRepresentation = null
)
vb
Function AddEmbeddedOleObject(
    topLeftCell As Cell,
    width As Single,
    height As Single,
    data As Byte(),
    oleObjectType As OleObjectType,
    objectRepresentation As SpreadsheetImageSource = Nothing
) As OleObject

Parameters

NameTypeDescription
topLeftCellCell

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

NameTypeDefaultDescription
objectRepresentationSpreadsheetImageSourcenull

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

|

Returns

TypeDescription
OleObject

The created OLE object.

|

See Also

Work with OLE Objects

OleObjectCollection Interface

OleObjectCollection Members

DevExpress.Spreadsheet Namespace