officefileapi-devexpress-dot-spreadsheet-dot-worksheet-ee5de7f8.md
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
PictureCollection Pictures { get; }
ReadOnly Property Pictures As PictureCollection
| Type | Description |
|---|---|
| PictureCollection |
A PictureCollection object that contains all the pictures in a worksheet.
|
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.
Dictionary<string, DevExpress.Drawing.DXImage> employeePictures = new Dictionary<string, DevExpress.Drawing.DXImage>();
foreach (Picture pic in sheet.Pictures)
{
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