Free Support Forum - aspose.com

Exception on using an evaluation copy and have opened files exceeding limitation

Hi, I am not opening 100 excel files at a time but somehow after few iterations of the loop in my code, I am getting this exception - which means the workbooks I am opening in sequential order are not getting closed (well, I am NOT closing excusively, as after the life time of the workbook object is completed, I guess, workbook gets automatically closed, please correct me if I am wrong!)

Can you let me know if there is any exclusive way of specifying .NET to close the workbook before the end of the life of the object in run time.

I am able to open workbook manually after running a particular block of code - which proves that aspose is not locking the workbook after save. If that is true, how am I getting the exception that I have crossed the limitation on workbooks count?

@SubbuatAspose,

Thanks for your query.

You may please send us a simple (runnable) console application which can be compiled and executed here for our analysis. We will reproduce the issue here and provide our feedback after using your sample application.

Thanks for your reply. I may not be able to send the code due to company policies. But here is the flow of the code I have.

for loop - 1 to 1000 (this is not fixed, depends on a dataset row count)
–Open the existing excel template (from a specified path)having all the charts and formulas pointed to a raw data sheet
–Populate the data into raw data sheet, again data read from a sql table
–Refresh the formulas in the template
–Save as a risk report

I will see if I can write code quickly for your reference where I can replicate this error and send you shortly. Meanwhile if you can go through above, you may understand the problem. Thanks once agan. Subbu
Note: you may ask me to move the line of code which opens the workbook out of the loop, but I am going to have parallel programming eventually to make it run faster rather than handling every iteration of the loop in sequential order.

@SubbuatAspose,

We need a sample application and template file to reproduce it on our end. Please share it when possible and we will provide our feedback after analysis.