Back to Devexpress

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

officefileapi-devexpress-dot-spreadsheet-dot-oleobjectcollection-dot-addembeddedoleobject-x28-cellrange-stream-oleobjecttype-spreadsheetimagesource-x29.md

latest2.6 KB
Original Source

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
OleObject AddEmbeddedOleObject(
    CellRange targetRange,
    Stream stream,
    OleObjectType oleObjectType,
    SpreadsheetImageSource objectRepresentation = null
)
vb
Function AddEmbeddedOleObject(
    targetRange As CellRange,
    stream As Stream,
    oleObjectType As OleObjectType,
    objectRepresentation As SpreadsheetImageSource = Nothing
) As OleObject

Parameters

NameTypeDescription
targetRangeCellRange

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

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