I had raised an issue with YEARFRAC in version 23.7 (CELLSJAVA-45531). I am seeing issues with the function in 23.8 as well.
With the attached file yearfrac1.xlsx.zip (12.6 KB), and running the following code
Workbook workbook = new Workbook("/Users/user1/Downloads/yearfrac1.xlsx");
workbook.calculateFormula();
System.out.println(workbook.getWorksheets().get("Sheet1").getCells().get("A3").getDoubleValue());
I get the output : 0.08469945355191257
while in Excel, the output is 0.0849315068493151.
This is a problem that needs to be fixed.
@dvector,
Thanks for the template XLSX file.
After an initial test, I am able to reproduce the issue as you mentioned by using your template XLSX file. I found YEARFRAC formula is not calculated properly.
We need to evaluate your issue in details. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): CELLSJAVA-45583
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
@dvector,
We are pleased to inform you that your issue has been resolved. The fix will be included in our upcoming release (Aspose.Cells v23.9) that we plan to release in the first half of September 2023. You will be notified once the new version is published.
The issues you have found earlier (filed as CELLSJAVA-45583) have been fixed in Aspose.Cells for Java 23.9.