Xceed Workbooks for .NET v3.0 Documentation
Xceed.Workbooks.NET Assembly / Xceed.Workbooks.NET Namespace / PictureCollection Class
Members Example


In This Topic
    PictureCollection Class
    In This Topic
    Represents a collection of all the Pictures in the Worksheet.
    Object Model
    PictureCollection ClassPicture Class
    Syntax
    'Declaration
     
    
    <DefaultMemberAttribute("Item")>
    Public Class PictureCollection 
       Inherits WorksheetElement
    'Usage
     
    
    Dim instance As PictureCollection
    [DefaultMember("Item")]
    public class PictureCollection : WorksheetElement 
    Example
    using( var workbook = Workbook.Create( "test.xlsx") )
      {
        // Get the first worksheet. A workbook contains at least 1 worksheet.
        var worksheet = workbook.Worksheets[ 0 ];
    
        var stream = new FileStream( PictureSampleResourcesDirectory + @"balloon.jpg", FileMode.Open, FileAccess.Read );
        // Add the stream picture in cell A4 and extend it to cell E12.
        var filenamePicture = worksheet.Pictures.Add( stream, "A4", "E12" );
    
        // Add the filename picture with its top left corner in 15th row and 1st column.
        var streamPicture = worksheet.Pictures.Add( PictureSampleResourcesDirectory + @"balloon.jpg", 14, 0 );
    
        workbook.Save();
      }
    Inheritance Hierarchy

    System.Object
       Xceed.Workbooks.NET.WorkbookElement
          Xceed.Workbooks.NET.WorksheetElement
             Xceed.Workbooks.NET.PictureCollection

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also