Aspose.Cells is used in our project for some spreadsheet calculation and spreadsheet output. During development, I found an issue that Aspose.Cells sometimes cannot calculate COUNTIFS formula sometimes.I attached the sample spreadsheet, and I just use following simple code to read some cell value in it:
Please pay attention that Cell 'C23' is using COUNTIFS formula, which should return value 2, but I got 1 !!! It will cause incorrect value in other cells which reference it.
I also try using Workbook.CalculateFormula method before getting values, but it doesn't work. So could anybody help to look into this issue?
Thanks for sharing the template file and sharing sample code.
After an initial test, I observed the issue as you mentioned by using your template file with your sample code. I got incorrect results even using Workbook.CalculateFormula() method.
Sample code:
Workbook wb = new Workbook(@“e:\test2\calTest.xlsx”); wb.CalculateFormula();
Console.WriteLine(wb.Worksheets[“Grouping and Tranche Names”].Cells[“C23”].Value);//1 should be 2
Console.WriteLine(wb.Worksheets[“Grouping and Tranche Names”].Cells[“F5”].Value);//null should be 3
I have logged a ticket with an id “CELLSNET-42137” for your issue. We will look into your issue soon.
Once we have any update on it, we will let you know here.
Thank you for your reply. So will your team include the fix in next release, or could you give me some alternative approach to get value correctly? Otherwise I have to let our template owner try changing the formula in the cells.
Well, we have not figured out your issue yet, so our next official release of the product (i.e., v7.6.1 which is due in early next week) might not include the fix for your issue. However, we might provide you the fixed version (e.g v7.6.1.X) after we release of our next official version (v7.6.1) and before the end of next week or so.
Once we have any update on it, we will let you know here.
Thank you for your update. But unfortunately, after using your given 7.6.0.7 version, I still got error value 1 for 'C23'. Could you guys check it again?
Another question is it looks not an official version of Aspose.Cells and what official version would contain the fix?
Thanks for your posting and using Aspose.Cells for .NET.
Please download and try the major release: Aspose.Cells for .NET 7.6.1 it works fine and giving the correct value of 2.
The previous release is minor release. It is equally useful for production environment without any issue. The major release includes the fixes of all minor releases too.
I'm sorry that I still got value of 1 for C23 and NULL value for F5 in attached spreadsheet after using 7.6.1.0. Number of this issue is 42137, but I didn't see it was listed in resolved bugs of 7.6.1 release. Could you confirm that?
I have rechecked this issue with the latest version: Aspose.Cells for .NET 7.6.1 and did not find any issue. I have tested it with the following code. I have attached the screenshot showing the output of the code. Please make sure you are using the latest version and not using any older version mistakenly.
Your issue number will be included in the next major release which will be due in the first week of next month. You will also get the automatic notification on this thread when the major release will be published.