Files exceeding limitation exception

Hi,


I get the following exception trace.
com.aspose.cells.CellsException: You are using an evaluation copy and have opened files exceeding limitation.
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.fu.b(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.bif.b(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.bif.a(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.bif.b(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.bif.a(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.Workbook.a(Unknown Source)
[16:15:54:878][29-04-2015][SYSERR][INFO][66]: at com.aspose.cells.Workbook.(Unknown Source).

Could you please explain the reason for the above exception?

Thanks in advance.

Hi,


Thanks for providing us some details.

Well, in an evaluation mode (using Aspose.Cells without setting/ using valid license) in an application/ program you can open only 100 files at a time, but you may close or save files (so there should not be more than 100 files opened at a time). This is the limitation when working with Aspose.Cells without a valid license set, see the document for your reference:

By the way, you may request a 30 days temporary license, so you could evaluate the product with its full capacity, please refer to the page:

Thank you.

How to close workbook in .net.

I am not getting any method for Aspose.cells.Workbook to close the workbook.

Any help would be gratly appreciated.

@kundanpandey,

Well, Aspose.Cells for .NET does not necessarily require really to free up the resources for the processes as the component is already optimized to do so automatically. Aspose.Cells is created in managed C# and is a pure .NET component, we do not use un-managed code. When objects are no more useful in the processes, GC would collect and release the memory occupied by the objects. Being a pure .NET component, Aspose.Cells for .NET relies on .NET garbage collector (GC) to allocate and free the memory for the different processes, although you may try to also use GC.Collect() or try Workbook.Dispose() and set Workbook to null in some cases for your need. Moreover, if you are using Stream objects, you need to call Close() and Flush() methods to manually release the resources for the objects when they are not used any longer.

Hope, this helps a bit.

1 Like

Hi Amjad,

Thanks for your quick response and let me know solution for error mentioned below -

In my api/application i’m getting error “Error: You are using an evaluation copy and have opened files exceeding limitation.”.
This error comes when we have many hits on our api and as per your below response i’m looking for a solution to resolve my error(to close too many opened files).

I tried to save the workbook but it didn’t worked, we are not doing any changes in file(only reading file).

I tried to use Workbook.Dispose()…but getting error that “Workbook doesnot contain a definition for Dispose”.

Setting work book object to null is also not helping to resolve my error.

Thanks…

@kundanpandey

It looks like you are working in evaluation mode. (using Aspose.Cells APIs without setting a valid license in code). We recommend you to kindly apply for 30 days temporary license so you may get a temporary license to work with the APIs with full capacity or to avoid any such (your mentioned) error in your application, see the document to obtain temporary license for your requirements:

Should you have any further queries or issue, feel free to contact us any time, we will be happy to assist you soon.

Hi Amjad,

I am not opening more than 100 instances for the same file at a moment, so i think no license is required. And i need solution to close old opened files. Please suggest me a workaround for this.

I have tried out below solutions but didn’t passed with them -

@kundanpandey,

For your information, the details I provided in one of previous post is not relevant to your task, it is related to garbage collector for freeing up resources when needed (for GC only), i.e.,

Please create a simple console demo application (runnable), zip the project and post us to show the issue, we will check it soon.

PS. we still recommend you to kindly get and try using temporary license to work with the APIs in full capacity or to avoid any such errors or other limitations. The temp license is totally free that will work for 30 days which is sufficient to evaluate the product.

@kundanpandey,
Your issue is just because you are using an evaluation copy of our component. “100 files” or “100 times” means not the count of concurrent operations, but the workbook instantiation times in the application’s life scope. You can get temporary license as guided above.