Aspose Cells ErrorCheckType.CALC does not work

Given test.xlsx, there is a warning on cell B1 about a possible incomplete formula calculation


The following code should programatically hide the error:


    final Workbook wb = // get workbook

    final Worksheet ws = wb.getWorksheets().get(0);
    final ErrorCheckOptionCollection opts = ws.getErrorCheckOptions();
    final int idx = opts.add();

    final ErrorCheckOption opt = opts.get(idx);
    opt.setErrorCheck(ErrorCheckType.CALC, false);
    opt.addRange(CellArea.createCellArea("B1", "B1"));

    wb.save(...); // save workbook


Unfortunately, it does not. All of the other ErrorCheckType.[ENUM] values work, except for CALC. I can see this by taking the saved XLSX file, unzip, inspect xl/worksheets/sheet1.xml and look at the node generated

Seeing how it's using a bitmask, I tried -1, and when you use opt.setErrorCheck(-1, false); it will set all of the error check types EXCEPT for CALC

Hi,


We need to evaluate if this is an issue with our product for ErrorCheckType.CALC or not. I did test your issue and checked the source .xml file for sheet1 but could not confirm if this is an issue or it works accordingly. We will evaluate your issue soon.

I have logged a ticket with an id “CELLSJAVA-40426”. Our concerned developer will look into it soon.

Thank you.

To be more specific, Aspose is unable to generate a node with attribute calculatedColumn=“1”, which I presume is supposed to be done by ErrorCheckType.CALC


Aspose cells is able to set every other type, except this one

Hi,


Thanks for providing us further details.

As we have already logged a ticket for your issue, so we will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

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

Please set ErrorCheckType.INCONSIST_RANGE flag, it should fulfill your needs.

Please see the following sample code for your reference.

Java


final Worksheet ws = wb.getWorksheets().get(0);

final ErrorCheckOptionCollection opts = ws.getErrorCheckOptions();

final int idx = opts.add();


final ErrorCheckOption opt = opts.get(idx);

opt.setErrorCheck(ErrorCheckType.INCONSIST_RANGE, false);

opt.addRange(CellArea.createCellArea(“B1”, “B1”));


You are correct that this can hide that particular error in this case.


However, the point of this bug report is that Aspose Cells has no way to create an entry

You have a enum for it, ErrorCheckType.CALC, and it does not work

FYI, I am the same as the original poster, this is my personal account

Hi,


Thanks for further details.

I have logged your comments against your existing issue id “CELLSJAVA-40426” into our database. Our concerned developer will look into it and we will get back to you soon.

Thank you.

Hi,

Thanks for using Aspose.Cells.

To output the content like for xlsx file, please use

ErrorCheckOption.setErrorCheck(ErrorCheckType.CALCULATED_COLUMN, false)

with our latest fix (V7.4.0.1).

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


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