Free Support Forum -

Aspose.Cells ISOWEEKNUM calculation is not same as Microsoft Excel



We are using Aspose.Cells java library (licensed) to refresh excel templates.
While using the library we found a discrepancy between formula evaluation by Microsoft Excel and Aspose.Cells.
Formula evaluated was ISOWEEKNUM and below are the details for the same.

=ISOWEEKNUM(J7+1) where J7 holds the value 2019-01-06 (Date with custom format YYYY-MM-DD)

On refreshing the excel template with above formula programmatically via Aspose.cells java library output is 1 but the same if done manually in Microsoft excel output is 2.

Can you please help in this regard ASAP, as this is affecting our internal customers.
Please let me know if there are more details required.




Thanks for your query.

Please share your sample file and code snippet with us for our testing. We will reproduce the problem and provide our feedback after analysis.



We have a large codebase which we can’t be shared but below is the small snippet used to refresh excel.

import com.aspose.cells.Workbook;
Workbook excelTemplateWithData = new Workbook(excelFileName);

Attached sample.xlsx where Cell A1 in Sheet 1 contains the date and cell A2 required formula (ISOWEEKNUM(A1+1)) (6.6 KB)



Thanks for the template file.

After an initial test, I am able to observe the issue as you mentioned by using the following sample code with your template file. I found that result of the formula/function “ISOWEEKNUM” is not the same as per MS Excel:
Sample code:

Workbook excelTemplateWithData = new Workbook("f:\\files\\sample.xlsx");

 System.out.println(excelTemplateWithData.getWorksheets().get(0).getCells().get("A2").getStringValue());//1 , it should be 2

I have logged a ticket with an id “CELLSJAVA-42807” for your issue. We will look into it soon.

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


Do we have any ETA on when we can expect an update?



This is to inform you that we have fixed your issue (logged earlier as “CELLSJAVA-42807”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


The issues you have found earlier (filed as CELLSJAVA-42807) have been fixed in Aspose.Cells for Java 19.1. You can also get the latest Aspose.Cells for Java version from Maven repos. with simple configurations. Please see the document for your reference:

This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi