Back to Devexpress

Worksheet.Pictures Property

officefileapi-devexpress-dot-spreadsheet-dot-worksheet-ee5de7f8.md

latest3.3 KB
Original Source

Worksheet.Pictures Property

Provides access to a collection of pictures in a worksheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
PictureCollection Pictures { get; }
vb
ReadOnly Property Pictures As PictureCollection

Property Value

TypeDescription
PictureCollection

A PictureCollection object that contains all the pictures in a worksheet.

|

Remarks

Use the PictureCollection.AddPicture method, accessible using the Worksheet.Pictures.AddPictures notation, to create a new picture and add it to a worksheet.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Pictures property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-use-worksheet-table-as-data-source/CS/SpreadsheetDocumentServerAsDataSourceExample/MyPictureProvider.cs#L39

csharp
Dictionary<string, DevExpress.Drawing.DXImage> employeePictures = new Dictionary<string, DevExpress.Drawing.DXImage>();
foreach (Picture pic in sheet.Pictures)
{

spreadsheet-document-api-use-worksheet-table-as-data-source/VB/SpreadsheetDocumentServerAsDataSourceExample/MyPictureProvider.vb#L33

vb
Dim employeePictures As Dictionary(Of String, DXImage) = New Dictionary(Of String, DXImage)()
For Each pic As Picture In sheet.Pictures
    employeePictures.Add(pic.Name, DXImage.FromStream(New MemoryStream(pic.Image.GetImageBytes(OfficeImageFormat.Bmp))))

See Also

Charts and Graphics in Spreadsheet Documents

How to: Insert and Delete Pictures

Worksheet Interface

Worksheet Members

DevExpress.Spreadsheet Namespace