IllegalArgumentException with calculateFormula()

Aspose Team,

We are getting an exception as below:
java.lang.IllegalArgumentException: fromIndex(18) > toIndex(1)("Based on cell "Conditions!AT40)
This exception is occuring while ‘calculateFormula()’ method/API is invoked. We have recently upgraded Aspose cells version to 20.2 and we are seeing this issue.
Attached is the xlsx file that we are having an issue. Would you please check?
Behavioral Health Expert Report - MASTER (4.6 MB)

We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-43140 – IllegalArgumentException while calling calculateFormula()


Please prioritize the fix for this.

Last time we had another issue reported via
We waited for a month and client release was on hold. After the issue fix, we released the client but encountered this issue.

If possible, please let us know what is there in the xlsx file that is causing this issue in both of these cases. We can modify the excel template and make it workable until this gets fixed from your end.


Thank you for providing more information. We will analyze it and provide our feedback accordingly.


We prioritized your issue and investigated in details. We are in the process to fixing your issue (we found the bug in Aspose.Cells internal module). Hopefully you should be getting the fix in the next couple of days.

I am afraid the issue is not template specific, it is not the problem of the file, so you cannot resolve the exception by simply changing a few values in the file. Please just wait and we will share the fixed version in 1-2 days.

We are sorry for any inconvenience caused!


Furthermore, we keep on changing/improving our calculation engine according to users’ requirements. During the evolution, some new bugs can be imported while certain bugs are being fixed. You can well aware and understand API development is not straight forward, you cannot always make it 100% bug free all the time. We always try our level best to enhance/improve the component with each release of the product to make it more robust and feature rich APIs. For CELLSJAVA-43100 and CELLSJAVA-43140, the issues are caused by different dataset and logic. We are afraid there is no simple way to fix them by changing few values in the template file(s).

Thanks for your understanding!

Thank you for the details.

Please let us know once this gets resolved.



Sure, we will attach the fix once the fix is available for public use.


Please try our latest version/fix: Aspose.Cells for Java v20.2.5 (attached)

Your issue should be fixed in it.

Let us know your feedback. (7.0 MB)

Thank you for the jar. We will test this and will get back to you.

Also, could you please share us what fixes were made in this minor version?


This resolved the above introduced issue.

Could you please share when will this get released i.e. 20.3?


Thank you for the feedback. We are working on Aspose.Cells for Java 20.3 release and it will hopefully be released this week.

The issues you have found earlier (filed as CELLSJAVA-43140) have been fixed in Aspose.Cells for Java v20.3. This message was posted using Bugs notification tool by ahsaniqbalsidiqui