I’ve tried to delete an image in worksheet which mapped to range.
This image is created by “Camera” feature of Excel which actively shows mapped area to a image. So this image is not a normal image but it saved as. https://msdn.microsoft.com/en-us/library/documentformat.openxml.office2010.drawing.cameratool(v=office.15).aspx
Below is the code which I tried. The code ends without failure but the image still remains in Excel. How can I delete this CameraTool image with Aspose?
Aspose Library Code - C#
using (Workbook workbook = new Workbook("Excel File Path"))
{
for (int i = workbook.Worksheets[0].Shapes.Count - 1; i >= 0; i--)
{
Aspose.Cells.Drawing.Shape shape = workbook.Worksheets[0].Shapes[i];
if (shape.GetType().Name == "Picture")
{
workbook.Worksheets[0].Shapes.Remove(shape);
}
}
workbook.Save("New Excel File Path");
}
Thanks for your posting and considering Aspose.Cells.
We have looked into this issue and found the issue. We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This is to inform you that the ticket logged earlier as “CELLSNET-45145” has been resolved. We will soon provide you the fix after performing QA and incorporating other enhancements and fixes.