Free Support Forum -

Opening an Excel file Workbook constructor throws NullReferenceException : Object reference not set to an instance of an object


We are evaluating using Aspose.Cells as part of our content authoring platform.

However I have come across a problem that occurs when I attempt to open one of our sample Excel templates. It should be noted that we created this template ourselves using the OpenXml sdk.

The template opens fine using either Excel or the OpenXml sdk however Aspose.Cells refuses to open it, giving the following stack trace:

at ࡏ.䚘.⺟(XmlTextReader ୴)
at ࡏ.䚘.䚡(XmlTextReader ఑)
at ࡏ.䘈.䘤(䙔 䘒)
at ࡏ.䘈.䘧(XmlElement 䘑, 䙔 䘒)
at ࡏ.䘈.䘐(XmlElement 䘑, 䙔 䘒, Int32 䘓, Boolean 䘔)
at ࡏ.䘈.⟲()
at ࡏ.䜂.䑙(䑶 䑓)
at ࡏ.䜂.䜒(䑶 䑓, String 䑔)
at ࡏ.䜂.䑑()
at ࡏ.䜂.ؠ()
at ࡏ.䧩.䧪(Workbook ௦, Stream ԓ)
at Aspose.Cells.Workbook.࣠(Stream ԓ, LoadOptions ࣡)
at Aspose.Cells.Workbook.࣠(String ח, LoadOptions ࣡)
at Aspose.Cells.Workbook…ctor(String file, LoadOptions loadOptions)
at AsposeCellsBug.Program.Main(String[] args) in C:\UBS\Dev\code\AsposeCellsBug\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

I’ve attached a small sample project along with the excel file, which reproduces this problem.

This is currently a major blocker for us in our evaluation of Aspose.Cells.

Kind regards



Thanks for providing us the sample project.

After an initial test, I can find the issue as you have mentioned. I have logged it with an id: CELLSNET-30609. We will look into your issue soon.

Thank you.


Please try the attached version/fix v7.0.1.1, we have fixed your issue now.

Thank you.


Just wanted to confirm that the fix worked for me.

Thank you for the quick response.



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

This message was posted using Notification2Forum from Downloads module by aspose.notifier.