I think, there is no difference between picture and image. Kindly define what do you mean, when you only want to remove only images and not pictures.
Just check, if shape is of type picture, if yes, then remove it otherwise don’t remove. I will provide you code example asap.
Please see the code below. I used your input.ods file. Please see the generated output ods file attached by me.
String path = “F:\Shak-Data-RW\Downloads\Files\input.ods”;
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.getWorksheets().getSheet(0);
for(int j=worksheet.getShapes().size()-1; j>=0; j–)
com.aspose.cells.Shape shp = worksheet.getShapes().get(j);
if (shp instanceof com.aspose.cells.Picture)
workbook.save(path + “.out.java.ods”, FileFormatType.ODS);
Thank you for your help. It’s working fine.