Skip to main content
All docs
V25.1
  • Row

    OleObjectCollection.AddLinkedOleObject(CellRange, String, OleObjectType, SpreadsheetImageSource) Method

    Inserts a linked OLE object into the specified cell range.

    Namespace: DevExpress.Spreadsheet

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

    NuGet Package: DevExpress.Spreadsheet.Core

    Declaration

    OleObject AddLinkedOleObject(
        CellRange targetRange,
        string fileName,
        OleObjectType oleObjectType,
        SpreadsheetImageSource objectRepresentation = null
    )

    Parameters

    Name Type Description
    targetRange CellRange

    A cell range to store the created OLE object.

    fileName String

    A path (including the file name) of the file to link.

    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