We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unreadable content

Hello,

We have an error when we try to open an Excel document, after saved it with Java Aspose Cells library.
BEFORE.xls : Original document
AFTER/xlsx : After after saving with Aspose

Java code:
Workbook workbook = new Workbook(filepath);
workbook.save(tempFileName));

Recovery Log:

- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error070080_01.xml</logFileName>
<summary>Errors were detected in file 'C:\AFTER.xlsx'</summary>
- <removedParts summary="Following is a list of removed parts:">
<removedPart>Removed Part: /xl/drawings/drawing1.xml part. (Drawing shape)</removedPart>
</removedParts>
</recoveryLog>


Best Regards,

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested your file with the latest version: Aspose.Cells for Java v16.11.8 and it works good. Please try it at your end and let us know your feedback.

I have also attached the output excel file generated with this code using the latest version for your reference.

Java
Workbook wb = new Workbook(dirPath + “BEFORE.xlsx”);
wb.save(dirPath + “BEFORE.out.xlsx”);

Thanks for your quick answer, but I also use the latest version (aspose-cells-16.11.0).

I found why we have an issue (and not you) : we call this function:
SheetRender sr = new SheetRender(worksheet, printOpts);


Bellow my full java code:

//New workbook with document
Workbook workbook = new Workbook(“C:\Temp\BEFORE.xlsx”);

//For each sheet
for (int i = 0; i<workbook.getWorksheets().getCount(); i++) {

//Get sheet
Worksheet worksheet = workbook.getWorksheets().get(i);

//Sheet render
ImageOrPrintOptions printOpts = new ImageOrPrintOptions();
SheetRender sr = new SheetRender(worksheet, printOpts);
}

//Creation of ExcelTools folder if it doesn’t exist
String tempPath = System.getProperty(“C:\test”;
File tempFolder = new File (tempPath);
tempFolder.mkdirs();

tempFileName = tempPath + “\” + AFTER.xlsx";

// workbook.get
workbook.save(tempFileName);

Hi,


Thanks for your sample code and using Aspose.Cells.

We are now able to observe this issue and logged it in our database for a fix.

This issue has been logged as

  • CELLSJAVA-42092 - Opening and saving the file while using SheetRender corrupts the output excel file

Hi,

Thanks for using Aspose.Cells.

This is to inform you that we have fixed your issue CELLSJAVA-42092 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Thank you for your reactivity.

Hi,

Thanks for using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for Java v16.11.10 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-42092) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

It works fine.
Thank you.

Hi,

Thanks for your feedback.

Good to know that your issue is sorted out by the new version/fix. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.