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

Free Support Forum - aspose.com

Obfuscated Exception thrown when loading invalid Workbook


We are using Aspose.Cells 8.6.2 to load excel documents. When the file is corrupted, we sometimes get an obfuscated exception instead of a CellsException. We think this is a defect.

This bug can be reproduced with this code and the attachment sample :
using (var fs = new FileStream(@“C:\Corrupted\Corrupted.xlsx”, FileMode.Open, FileAccess.Read))
var workbook = new Aspose.Cells.Workbook(fs);
which throws :
”.”” was unhandled
Message=Cannot read that as a ZipFile
à . . ( )
à . .Read(Stream , TextWriter , Encoding , EventHandler1 )</font></div><div><font size="2"> à . .Read(Stream )</font></div><div><font size="2"> à . . (Stream )</font></div><div><font size="2"> à Aspose.Cells.Workbook. (Stream )</font></div><div><font size="2"> à Aspose.Cells.Workbook. (Stream , LoadOptions , Boolean )</font></div><div><font size="2"> à Aspose.Cells.Workbook..ctor(Stream stream)</font></div><div><font size="2"> à ConsoleApplication3.Program.Main(String[] args) dans c:\Users\cpetiot\Documents\Visual Studio 2013\Projects\ConsoleApplication3\ConsoleApplication3\Program.cs:ligne 16</font></div><div><font size="2"> à System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)</font></div><div><font size="2"> à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)</font></div><div><font size="2"> à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()</font></div><div><font size="2"> à System.Threading.ThreadHelper.ThreadStart_Context(Object state)</font></div><div><font size="2"> à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)</font></div><div><font size="2"> à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)</font></div><div><font size="2"> à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)</font></div><div><font size="2"> à System.Threading.ThreadHelper.ThreadStart()</font></div><div><font size="2"> InnerException: ”.ƒž</font></div><div><font size="2"> HResult=-2146233088</font></div><div><font size="2"> Message= Bad signature (0x00000000) at position 0x00002215</font></div><div><font size="2"> Source=Aspose.Cells</font></div><div><font size="2"> StackTrace:</font></div><div><font size="2"> à . . ( , Dictionary2 )
à . . ( )
à . . ( )

Thanks and best regards,
Christophe PETIOT

Hi Christophe,

Thank you for contacting Aspose support.

We have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET and we are able to notice that the exception for this case has obfuscated type. We have logged this incident as improvement in our database and have requested the product team to consider improving the exception handling for such scenarios. We will keep you posted with updates in this regard.


Thanks for using Aspose.Cells.

We have looked into this issue further and found this is not a bug but the excel file you provided to us is actually corrupt and Microsoft Excel is unable to open it. If the file is corrupt, Aspose.Cells will automatically throw an exception.


This Excel file is actually corrupted but you can’t throw an obfuscated exception because we’re not able to catch it specifically. We’re processing lot of files for our clients and we need a way to distinguish an exception due to an invalid file from another exception, to take the appropriate action.
For this reason, you should never throw an obfuscated exception, so we’re sure this is a defect.

Christophe PETIOT

Hi Christophe,

Thank you for writing back. We have logged your comments to the aforementioned ticket and have requested the concerned member of the product team to reconsider this scenario. As soon as we receive further updates, we will let you know here.


This is to inform you that your issue logged earlier as “CELLSNET-44093” has been fixed. We will soon provide the fix after performing QA and incorporating other enhancements and fixes.

Once the fix is available for public use, we will let you know here with a download url/ attachment.

Thank you.

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

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