GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ExcelEmbeddedObjectCollection Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a read-only collection of ExcelEmbeddedObjects in the worksheet.

    • C#
    • VB.NET
    public sealed class ExcelEmbeddedObjectCollection : ExcelDrawingCollection<ExcelEmbeddedObject>, IList<ExcelEmbeddedObject>, ICollection<ExcelEmbeddedObject>, IEnumerable<ExcelEmbeddedObject>, IEnumerable
    Public NotInheritable Class ExcelEmbeddedObjectCollection
        Inherits ExcelDrawingCollection(Of ExcelEmbeddedObject)
        Implements IList(Of ExcelEmbeddedObject), ICollection(Of ExcelEmbeddedObject), IEnumerable(Of ExcelEmbeddedObject), IEnumerable
    Inheritance:
    System.Object
    ExcelDrawingCollection<ExcelEmbeddedObject>
    ExcelEmbeddedObjectCollection
    Implements
    System.Collections.Generic.IList<ExcelEmbeddedObject>
    System.Collections.Generic.ICollection<ExcelEmbeddedObject>
    System.Collections.Generic.IEnumerable<ExcelEmbeddedObject>
    System.Collections.IEnumerable

    Methods

    Add(Stream, String, Double, Double, Double, Double, LengthUnit, String)

    Adds a new embedded Excel object to the collection, using the specified data stream.

    • C#
    • VB.NET
    public ExcelEmbeddedObject Add(Stream stream, string originalPathOrFileName, double left, double top, double width, double height, LengthUnit unit, string explicitContentType = null)
    Public Function Add(stream As Stream, originalPathOrFileName As String, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit, explicitContentType As String = Nothing) As ExcelEmbeddedObject
    Parameters
    stream
    System.IO.Stream

    The stream containing the embedded object data.

    originalPathOrFileName
    System.String

    The original path or file name of the embedded object.

    left
    System.Double

    The distance of the left edge of the button from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the button from the top edge of the worksheet or group.

    width
    System.Double

    The button's width.

    height
    System.Double

    The button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    explicitContentType
    System.String

    The explicit content type of the embedded object, if any.

    Returns
    ExcelEmbeddedObject

    A new ExcelEmbeddedObject added to the collection.

    Exceptions
    System.ArgumentNullException

    Thrown if stream or originalPathOrFileName is null.

    Add(String, Boolean, Double, Double, Double, Double, LengthUnit, String)

    Adds a new embedded or linked Excel object to the collection from the specified file path.

    • C#
    • VB.NET
    public ExcelEmbeddedObject Add(string path, bool linked, double left, double top, double width, double height, LengthUnit unit, string explicitContentType = null)
    Public Function Add(path As String, linked As Boolean, left As Double, top As Double, width As Double, height As Double, unit As LengthUnit, explicitContentType As String = Nothing) As ExcelEmbeddedObject
    Parameters
    path
    System.String

    The file path to the embedded or linked object.

    linked
    System.Boolean

    Indicates whether the object should be linked (true) or embedded (false).

    left
    System.Double

    The distance of the left edge of the button from the left edge of the worksheet or group.

    top
    System.Double

    The distance of the top edge of the button from the top edge of the worksheet or group.

    width
    System.Double

    The button's width.

    height
    System.Double

    The button's height.

    unit
    LengthUnit

    The length unit in which all length parameters are specified.

    explicitContentType
    System.String

    The explicit content type of the embedded object, if any.

    Returns
    ExcelEmbeddedObject

    A new ExcelEmbeddedObject added to the collection.

    Exceptions
    System.ArgumentNullException

    Thrown if path is null.

    System.IO.FileNotFoundException

    Thrown if the file at path does not exist.

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    EmbeddedObjects
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.