Hi,
I am using aspose cell 7.5 version and doing as followig to remove drawing(charts n Images) from worksheets
workbook.getWorksheets().get(sheetIndex).removeAllDrawingObjects()
Please suggest if this is correct way of doing so. All I want is to just remove the charts n images out of the file and get a new file with content only.
Also, the attached file is taking too much time to open/load in memory , please suggest any solution to this.
If i execute following code on attached file, i am also getting exception
Workbook workbook=new Workbook(inputFilePath);
for(int sheetIndex=0;sheetIndex<workbook.getWorksheets().getCount();sheetIndex++){
workbook.getWorksheets().get(sheetIndex).removeAllDrawingObjects();
System.out.println(“Sheet Done:-”+sheetIndex);
}
workbook.save(outputFilePath);
==========================
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at com.aspose.cells.FileFormatUtil.extensionToSaveFormat(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.intralinks.odfprocessingTest.ODSWorkBook.saveAsContentOnly(ODSWorkBook.java:315)
at com.intralinks.odfprocessingTest.ODSWorkBook.main(ODSWorkBook.java:83)