Free Support Forum -

COUNT() Function Problem in Aspose.EXCEL version


I'm actuallly using Aspose.Excel to import the value into excel ,those files contain formulas,then calculates the result of formulas.

I have noticed a problem with the COUNT() Function which doesn't return the same value in Excel and in Aspose.Excel.

For example in the Excel file i have the following formula in Cell 10,0 : "=COUNT(A1:A10)". Excel diplays the right value, When i open this Excel file with aspose and that i run following code, it will diplay 0 :

Aspose.Excel.License license = new Aspose.Excel.License();
Excel excel=new Excel();
Worksheet ws = excel.Worksheets[0] ;
for(int i=0;i<10;i++)
ws.Cells[i, 0].PutValue(i);

excel.CalculateFormula(true) ;

MessageBox.Show("Value : " + ws.Cells[10, 0].Value) ;

you can find the right value when open the test1.xls with ms excel.

Am I doing something wrong ?

Thank you


That’s a bug. Please check this attached fix. Aspose.Excel is changed to Aspose.Cells. Please change the namespace in your program.