NullReferenceException openning not Excel OOXML files in Aspose.Cells.dll 8.3.1.0

Hi,

Tested newest Aspose.Cells.dll (8.3.1.0) before including it my project and got issue.

NullReferenceException is thrown when I try to open some files:
  • regular OOXML Word and PowerPoint files. CellsException with code ExceptionType.FileFormat must be thrown;
  • password-protected OOXML Word and PowerPoint files if valid password is specified. As valid password was specified, and file was decrypted, then CellsException with code ExceptionType.FileFormat must be thrown.
Sample files and project attached.

Thanks,
Alex Shloma

Hi Alex,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the latest version of Aspose.Cells for .NET 8.3.14, and we have noticed that Aspose.Cells for .NET API throws System.NullReferenceException while loading unsupported file formats. I agree with you that Aspose.Cells APIs should throw a proper exception, something like CellsException with code ExceptionType.FileFormat as you have suggested it. However, the Aspose.Cells APIs are incapable of decrypting presentation and document formats because this is beyond the scope of Aspose.Cells APIs. In such case where unsupported encrypted file formats are fed into an instance of Workbook, the API should throw similar exception as discussed above. Please confirm the behavior so we can log it for product team’s review.

Hi Babar Raza,


Think, that in both cases CellsException with FileFormat code should be thrown.

Thanks,
Alex Shloma

Hi Alex,


Thank you for the confirmation. We have logged the ticket CELLSNET-43287 in our database requesting the product team to review your requirements. Please spare us little time to properly analyze the presented scenario and it’s implementation feasibility. As soon as we receive any updates in this regard, we will post here for your kind reference.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.3.1.6 and let us know your feedback.

Downloaded Aspose.Cells 8.3.1.6.


NullReferenceException is no longer thrown. CellsException is thrown. This is OK.

But I have one question, why UnsupportedFeature code is used? Why not FileFormat code? For legacy files CellsException with FileFormat code is thrown. For consistency it is better to use FileFormat code for Ooxml files too.

Your thoughts?

Thanks,
Alex Shloma

Hi Alex,


Thank you for writing back.

It is best that the product team addresses your concerns, therefore we have logged your comments to the ticket associated with this thread. Please allow us little time to discuss this matter internally and get back to you with updates in this regard.

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


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