menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IOleObjects - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface IOleObjects

    Represents the Ole objects shape collections.

    Inherited Members
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.Add(Syncfusion.XlsIO.IOleObject)
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.Clear()
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.Contains(Syncfusion.XlsIO.IOleObject)
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.CopyTo(Syncfusion.XlsIO.IOleObject[], System.Int32)
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.Count
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.IsReadOnly
    System.Collections.Generic.ICollection<Syncfusion.XlsIO.IOleObject>.Remove(Syncfusion.XlsIO.IOleObject)
    System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.IOleObject>.GetEnumerator()
    System.Collections.Generic.IList<Syncfusion.XlsIO.IOleObject>.IndexOf(Syncfusion.XlsIO.IOleObject)
    System.Collections.Generic.IList<Syncfusion.XlsIO.IOleObject>.Insert(System.Int32, Syncfusion.XlsIO.IOleObject)
    System.Collections.Generic.IList<Syncfusion.XlsIO.IOleObject>.Item[System.Int32]
    System.Collections.Generic.IList<Syncfusion.XlsIO.IOleObject>.RemoveAt(System.Int32)
    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public interface IOleObjects : IList<IOleObject>, ICollection<IOleObject>, IEnumerable<IOleObject>, IEnumerable

    Methods

    Add(String, Image, OleLinkType)

    Adds new ole object to the collection.

    Declaration
    IOleObject Add(string fileName, Image image, OleLinkType linkType)
    Parameters
    Type Name Description
    System.String fileName

    File name.

    System.Drawing.Image image

    File image.

    OleLinkType linkType

    Link type.

    Returns
    Type Description
    IOleObject

    Returns a Ole object

    Remarks

    This method is not supported in UWP, ASP.NET Core and Xamarin.

    Examples

    The following code illustrates how to add an IListObject to the IListObjects collection.

            using (ExcelEngine excelEngine = new ExcelEngine())
            {
                //Create worksheet
                IApplication application = excelEngine.Excel;
                application.DefaultVersion = ExcelVersion.Excel2013;
                IWorkbook workbook = application.Workbooks.Create(1);
                IWorksheet worksheet = workbook.Worksheets[0];
    
                //Create image stream
                System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
    
                //Add ole object
                IOleObject oleObject = worksheet.OleObjects.Add("Shapes.xlsx", image, OleLinkType.Embed);
    
                //Save and dispose
                workbook.SaveAs("OLEObjects.xlsx");
                workbook.Close();
            }

    Extension Methods

    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved