I am currently evaluating Aspose.Cells for java and I’ve found a difference in its behaviour when compared to Excel. When I run the following code:
public static void main(String someArgs) throws Exception
Workbook workbook = new Workbook(“test/Test001.xls”);
int sheet = 0;
int row = 0;
int col = 0;
On the attached spreadsheet (which contains in cell Sheet1!A1 an invalid reference to another cell) I get the following output:
Basically the workbook originally (from Excel) contains a #REF!, and the saved resulting workbook contains a #REF! when recalculated in Excel, but a recalc in Aspose results in a zero.
Should Aspose.Cells match Excel’s behaviour as close as possible?
Thanks for your code snippet and sample file.
After an initial test, I can notice the issue as you have mentioned. I got the same output as per your console output.
I have logged a ticket with an id “CELLSJAVA-40476” for your issue. We will look into your issue soon.
By the way, there is one flaw in your code i.e. please change your last line of code:
Because you are saving in XLS file format and not in SpreadsheetML(XML) file format. If you need to save to SpreadsheetML file format, then your code can be:
Thanks for the feedback, and thanks for raising this as an issue!
Thanks for your posting and using Aspose.Cells.
We have already logged your issue. Once, we will have some update for you, we will share it with you asap.