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

Free Support Forum - aspose.com

Aspose.Cells .NET can't open XLS file - fails with End of stream reached exception


We are currently attempting to open and modify the attached excel file. The file has been modified to remove private information. The exception we are getting when attempting to open with Aspose is:

End of stream reached.
   at \u0006 ​ .\u0003(Byte[] \u0002)
   at \u000e ​ .\u0005()
   at \u000e ​ .\u0003()
   at \u000e ​ .\u0002(MemoryStream \u0002)
   at \u0002 ​ .\u0006 ()
   at \u0002 ​ .\u0002(WorksheetCollection \u0002, Worksheet \u0003, \u0008 ​  \u0005, \u0006 ​  \u0008)
   at \u0008 ​ .\u000f (\u0006 ​  \u0002)
   at \u0008 ​ .\u0002 (\u0006 ​  \u0002)
   at \u0008 ​ .\u0005 (\u0006 ​  \u0002)
   at \u0008 ​ .\u0002(MemoryStream \u0002)
   at \u0008 ​ .\u0003(\u000e    \u0002)
   at \u0008 ​ .\u0005(\u000e    \u0002)
   at Aspose.Cells.Workbook.\u0002(Stream \u0002, LoadOptions \u0003, Boolean \u0005)
   at Aspose.Cells.Workbook.\u0002(String \u0002, LoadOptions \u0003)1

In doing some diagnostic on the document, if we remove the second sheet titled “Pivot Variance Analysis” we are able to open the document with Aspose.

Any help in identifying any settings, changes, or ways we can approach opening this document without requesting our end user to modify the document would be greatly appreciated. Thank you!

AsposeLoadError.zip (290.5 KB)


Thanks for using Aspose APIs.

We were able to observe the exception while loading your provided xls file. We have logged the issue in our database for investigation and for a fix. Once, the issue is resolved or we have some other news for you, we will update you asap.

This issue has been logged as

  • CELLSNET-46059 - Unable to open XLS file as it throws Exception while Loading


Workbook wb = new Workbook("AsposeLoadError.xls");


System.Exception was unhandled
  Message=End of stream reached.
	   at   ​ . (Byte[]  )
	   at   ​ . ()
	   at   ​ . ()
	   at   ​ . (MemoryStream  )
	   at   ​ . (      , Worksheet  ,  ​​   )
	   at   ​ .  ()
	   at   ​ . (WorksheetCollection  , Worksheet  ,  ​​   ,   ​   )
	   at  ​​ .  (  ​   )
	   at  ​​ .  (  ​   )
	   at  ​​ .  (  ​   )
	   at  ​​ . (MemoryStream  )
	   at  ​​ . (      )
	   at  ​​ . (      )
	   at Aspose.Cells.Workbook. (String  , LoadOptions  )
	   at Aspose.Cells.Workbook..ctor(String file)

Hi Shakeel,

Thanks so much for the update. I am surprised that it’s a suspect defect and not something on our side, but am glad to hear that it can be investigated. Thank you!


We have started work over it and we are hopeful, we will be able to fix your issue soon. And if the issue is simpler (and not very complex) to be resolved, then we will provide you fix in next few days hopefully.

That’s great, thank you Shakeel!


Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-46059 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.

Hi Shakeel,

Thanks for sending this over. I am going to provide the build to the team and will let you know if there is any additional feedback. Thank you!

The issues you have found earlier (filed as CELLSNET-46059) have been fixed in this update. Please also check the document/article for your reference: https://docs.aspose.com/display/cellsnet/Installation