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

Free Support Forum - aspose.com

Array formula using 'RIGHT()' returning error

I have a simple excel sheet containing an array formula that uses the RIGHT() method in Excel (see attached). The referenced cells contain numbers 10 through 15 while the array formula is {=SUM(IF(RIGHT($A$2:$A$7,2)=“15”,$A$2:$A$7,FALSE))}. This correctly returns 15 in Excel.

However if I open the the workbook using Aspose and calculateFormula, the value is returned as an error “#VALUE!”.

The code I’m running is as simple as:

workbook = new Workbook(filepath);

Can Aspose not handle array formula?



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

We were able to replicate this issue with the latest version with the following code. We have logged this issue in our database. We will look into it and resolve this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40523.


String filePath=“F:\Shak-Data-RW\Downloads\arrayRight.xls”;

Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.getWorksheets().get(0);

Cell b9 = worksheet.getCells().get(“B9”);


workbook.save(filePath + “.out.xls”);


Thanks for the update.

This brings up a more general issue. How can I ensure that a sheet is being calculated correctly and without errors?

I have been using a method along the lines of:

List erroredCellLocations = new ArrayList<>();

FindOptions findOptions = new FindOptions();

Cell foundCell;
Cell prevCell = null;
int cnt = worksheetCells.getCount();

for (int i = 0; i < cnt; i++) {
foundCell = worksheetCells.find("#VALUE!", prevCell, findOptions);
if (foundCell != null) {
prevCell = foundCell;
return erroredCellLocations;

Is there a more efficient way to check if a worksheet / workbook contains errors?



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

Your approach is right. Finding the string using Find API is the efficient way of checking the workbook if it contains #VALUE!.

The other approach is to loop through all the cells and check their values, which is not efficient way.


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

We have fixed the issue of calculating formula.

Please download and try this fix: Aspose.Cells for Java v7.4.3.5 and let us know your feedback.

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

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.