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

Free Support Forum - aspose.com

'Cannot find central directory' when converting to stream using Web API

Hi,

When I am attempting to load an ‘xls’ workbook into a workbook from a stream, it fails with ‘Cannot find central directory’.

The code I am using is:

var workbook = new Workbook(Request.Content.ReadAsStreamAsync().Result);

This issue only occurs for ‘xls’. XLSX loads perfectly fine.

Following is the a snippet of the stacktrace:

at ڋ.ẘ.ỿ()
at ڋ.ẘ…ctor(Stream stream)
at ڋ.ẕ.ẗ(Stream ঔ)
at ڋ.⅛.Ⅳ()
at ڋ.⅛.ऄ()
at ڋ.䖂.䖃(Workbook ෌, Stream Ԡ)
at Aspose.Cells.Workbook.ԝ(Stream Ԡ, LoadOptions ԟ)
at Aspose.Cells.Workbook…ctor(Stream stream)

We are using aspose cells 5.2.2.0.

I look forward in hearing from you.

Kind Regards

Zahir

Hi,


Thanks for providing us some details.

Well, since you are using some older version of the product, so we recommend you to kindly upgrade to and download and try our latest version: Aspose.Cells for .NET (Latest Version). Over the years, we have made lots of enhancements and included many new useful features to make the product more robust and feature rich APIs.

Furthermore, we cannot evaluate your issue using older versions as the fix (if there is any issue) can be only based on latest APIs set. If you find any issue with latest version of the product using your template file, kindly attach the template file and we will check your issue soon.

Thank you.