How to identify corrupt excel file (2007) using Aspose.cell java

Hi,

We have one requirement,where we have to identify corrupt excel files 2007 format (.xlsx).

Is there any way to find this out and if possible can you please provide sample code.


Thanks,
Sachin Dagar

Hi,


I am afraid, there is no direct way to detect if the underlying Excel file (XLSX) is corrupt. There is no option available (in Aspose.Cells APIs) to detect if a file is corrupt or not. Normally, Aspose.Cells won’t read any corrupted file into its object model. Aspose.Cells would throw an exception when reading any file which has corrupted records in it.

Thank you.

I have the file which is corrupted and Aspose API just read/process it with out throwing any exception.

Attaching sample excel file.

Hi Sachin,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. The file provided by you is corrupt. MS-Excel 2010 is unable to open or repair it. However, it is loaded fine in Aspose.Cells but Aspose.Cells throws exception on saving it.

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 update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40774.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.0.0.1 (attached).
Now
we give CellsException for such kind of corrupted files.

Thank you.

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


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