Free Support Forum - aspose.com

COUNT() Function Problem in Aspose.EXCEL version 3.6.1.0

Hello,

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();
license.SetLicense("Aspose.Excel.lic");
Excel excel=new Excel();
excel.Open("test.xls");
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) ;
excel.Save("test1.xls");

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

Am I doing something wrong ?

Thank you

Aspose.Excel 3.6.1.0

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