Free Support Forum -

Faster way than WorkBook.CalculateFormula()?

I have a web service that inputs values into a large excel work, then has Aspose run CalculateFormula on the Workbook, and finally gets around 10 values from the spreadsheet.

The problem is this can take around 10 seconds in the CalculateFormula every time my web service is called. Is there anything I can do to improve this performance? I am using the latest version (7.3.5).

Basic code snippet below:

using (var stream = new MemoryStream(excelFile)) // excelFile is a byte[]
var workbook = new Workbook(stream);

// … Input data to workbook


// …Get calculated data from workbook

return results;


Thanks for your posting and using Aspose.Cells for .NET.

Please set the Workbook.Settings.CreateCalcChain=false and see if it increases your performance.

Please see the following documentation article for your complete reference.

I didn’t see any difference in my unit test time. I’m going to see if it makes any difference when running in the web services.

My goal is to make each web service call that runs my sample code to be as quick as possible.


Thanks for your feedback and using Aspose.Cells for .NET.

It makes difference when there are lot of diverse formulas inside a workbook

Other than this, you can also try the Worksheet.CalculateFormula() and direct calculation of the formula as discussed in this article and see if any of them could make any difference in your scenario.