Aspose.Cells thread safety issue

Hello. I have a piece of code that opens excel workbooks, reads some information out of them, and then closes them. When I run it on a single thread, it works just fine. However, when I run multiple workbooks in parallel, I get a CellsException when I call Workbook.CalculateFormula ("…Invalid formula: More than one token in stack"). I am opening the workbook using a Stream. The Stream is NOT shared between threads. Each thread creates a new stream and is backed by a new byte buffer. The threads also do NOT share workbooks. The workbooks are new-ed up within instances of classes that are new-ed up one per thread.


As such, I believe that Aspose.Cells is using some shared state or otherwise Aspose.Cell is not thread-safe.

I am using 8.5, .net

Hi,

Thanks for your posting and using Aspose.Cells.

It should work fine as per your approach because you are not sharing the workbook. Please provide us your runnable console application replicating this issue. We will run it at our end and log this issue in our database for a fix.

Please also download and try the latest version: Aspose.Cells
for .NET v8.5.1.3
and see if it makes any difference and resolves your issue.

Let us know your feedback.

What are the changes between 8.5.1.0 and 8.5.1.3?


no problem - I’ll try with 8.5.1.0 first and then with 8.5.1.3. and if it still doesn’t work I’ll provide a repro

Ok, my code now works with 8.5.1.0. I would still like to know the differences between that and 8.5.1.3. 8.5.1.3 doesn’t seem to be an official release?

Hi Kathryn,


It is good to know that you are able to resolve the problem with latest release. You are right, Aspose.Cells for .NET 8.5.1.3 is a maintenance release that is why we shared it in the forums only. Being a maintenance release, 8.5.1.3 does not have the release notes therefore we will not be able to share the detailed changes between 8.5.1.0 & 8.5.1.3. However, detailed release notes will be available with next major release of the API v8.5.2 that is scheduled for publication around 15th of August 2015.