Excel: How to check if a cell contains an image

Hi, I need to manage images in an excel document, and I seen this video:
http://www.aspose.com/videos/aspose.cells/aspose.cells-for-.net/insert-picture-and-comment-in-excel.aspx

This was very useful for me, and I can add images on a range:

Dim imgIndex As Integer = range.Worksheet.Pictures.Add(range.FirstRow, range.FirstColumn, imageFile)
Dim pic As Aspose.Cells.Drawing.Picture = range.Worksheet.Pictures(imgIndex)
pic.Placement = Drawing.PlacementType.FreeFloating

But now I need to check if an image is already in the range, and if it is I need to remove it.
Is there a way to check if an image is contained in a cell?

Thank you for your help


This message was posted using Page2Forum from Converting to PDF Files - Aspose.Cells for .NET

Hi,


I think you may use some properties to determine the cell, e.g see the sample code segment here.


Dim pictures As Aspose.Cells.Drawing.PictureCollection = sheet.Pictures
Dim picture As Aspose.Cells.Drawing.Picture = pictures(0)
Dim UpperLeftRow As Integer = picture.UpperLeftRow
Dim UpperLeftColumn As Integer = picture.UpperLeftColumn
Dim LowerRightRow As Integer = picture.LowerRightRow
Dim LowerRightColumn As Integer = picture.LowerRightColumn
'…etc.