Copy/Save produces Corrupt File

Attached is a java program that demonstrates the Workbook.copy(src) followed by a…) generates an invalid file.

Please download AsposeCopyIssue.7z from

The program generates two files in the temp folder. One prefixed with ‘original’ the other prefixed with ‘copy’. Attempt opening the files with excel. Notice that the one prefixed with ‘original’ opens without an error. When opening the file prefixed with ‘copy’ Excel will report the file as being corrupted.


We have tested this issue with the following sample code 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 news for you, we will update you asap.

This issue has been logged as

  • CELLSJAVA-42373 - Copying workbook and then saving corrupts the output Excel file

Download Links: (44.0 KB) (43.1 KB)


Workbook workbook = new Workbook(dirPath + "aspose-copy-issue.xlsx");

Workbook copy = new Workbook();
copy.copy(workbook); + "outputCopy.xlsx");


Thanks for using Aspose APIs.

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


Please download and try the following fix and let us know your feedback.

1 Like

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

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