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

Free Support Forum - aspose.com

Workbook.CalculateFormula() doesn't compute IRR correctly


I have a worksheet where the IRR function doesn’t seem to get computed correctly. In my workbook, I update some cells that the IRR function is using for input. After I update the cells, some of the IRR function cells have IsErrorValue set to true instead of the correct value.

If you can open the saved output.xlsx workbook in Excel 2010’s “Protected View”, you can see that the problem cells show #NUM!, and if you open in in normal mode, those IRR values will be calculated correctly.

Attached is the test Visual Studio project / spreadsheet that replicates this problem.

The program will input some CashFlow numbers into D15:N:15, and then the IRR for each year should be calculated in E16:N16. After that, G9 will do a HLOOKUP to find the “correct” IRR to display. The correct values for Cashflow and IRR are shown in rows 21 and 22.

Alex Moore

Hi Alex,

Thanks for the project.

Yes, you are right. I have tested your code with your template file and found the issue as you mentioned. I have logged a ticket with an id: CELLSNET-40373. We will look into it soon.

Thank you.


Please download and try this fix: Aspose.Cells for .NET v

The issues you have found earlier (filed as CELLSNET-40373) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.