GemBox.Spreadsheet

ExcelWorksheet.Pictures Property

Gets ExcelPictureCollection containing images.

public ExcelPictureCollection Pictures {get;}

Remarks

You can insert many popular graphics file formats into your worksheets of different graphics file formats: Joint Photographic Experts Group (.jpg), Microsoft Windows Bitmap (.bmp). Graphics file formats such as: Enhanced Metafile (.emf), Windows Metafile (.wmf) you can insert into your worksheets and save to destination excel file but you cannot read the excel files which containt such graphics.

Example

Following code demonstrates how to use images. It shows next features:

  1. bmp, jpeg loading
  2. bmp, jpeg loading with custom coordinates and dimensions
[Visual Basic]
    sheet.Pictures.Add( "Image.bmp" ) 
    sheet.Pictures.Add( "Image.bmp", New Rectangle(10, 50, 100, 100) )
[C#]
    sheet.Pictures.Add( "Image.bmp" );
    sheet.Pictures.Add( "Image.bmp", new Rectangle( 10, 50, 100, 100 ) );

See Also

ExcelWorksheet Class | GemBox.Spreadsheet Namespace | ExcelPictureCollection | ExcelPicture