Save an excel with ink and textbox grouped together cause the file to be corrupted

We have an excel file with ink and textbox grouped together, when try to read the excel file then save it the file become corrupted, i used the following java code:

Workbook workbook = new Workbook(“group_textbox_with_ink.xlsx”);
workbook.save(“group_textbox_with_ink_saved.xlsx”, SaveFormat.XLSX);

I am using aspose-cells v 22.2 java.

If i ungroup the ink and textbox the save working fine.

@ANAS2023
Would you like to provide your sample file? We will check it soon.

Yes sure, see attached file
group_textbox_with_ink.zip (8.2 KB)

@ANAS2023,

Please try our latest version/fix: Aspose.Cells for Java v23.11:
(Releases | Maven)

I have tested your scenario/case using your template file to be read and then resaved by Aspose.Cells for Java API, it works fine and the output XLSX file is fine tuned. Please find attached the output XLSX file after using your sample code segment.
group_textbox_with_ink_saved.zip (8.8 KB)

Thank you amjad, it is working now. but now i got an CellException (a = 4) when try to convert the result file to pdf, i am using this code:
Workbook workbook = new Workbook(inputStream);|
com.aspose.cells.PdfSaveOptions pdfSaveOptions = new com.aspose.cells.PdfSaveOptions();|
pdfSaveOptions.setOnePagePerSheet(true);|
workbook.save(outputStream, pdfSaveOptions);|

@ANAS2023,

Thanks for providing further details.

I am able to reproduce the issue as you mentioned by converting your template XLSX file to PDF. I found “com.aspose.cells.CellsException” when saving an XLSX file to PDF:

Workbook workbook = new Workbook("f:\\files\\group_textbox_with_ink.xlsx");
com.aspose.cells.PdfSaveOptions pdfSaveOptions = new com.aspose.cells.PdfSaveOptions();
pdfSaveOptions.setOnePagePerSheet(true);
workbook.save("f:\\files\\group_textbox_with_ink_saved.pdf", pdfSaveOptions);//exception

We need to evaluate your issue in details. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSJAVA-45783

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@ANAS2023
Exceptions are no longer thrown, this will be included in the next fix, but ink-based custom content still does not render correctly. Since the problem is more complex, we need more time to solve it. We will notify you as soon as progress is made.

1 Like