Any alternative to using CountIf() in Aspose.Excel?


#1

Hi,

I am attempting to use the CountIf(). However, when opening the spreadsheet in Excel, i get a #NAME? error in the cell(s) where the formula is used. A Typical formula looks like this:

COUNTIF(D3: D3, "C") // space added after colon to keep emoticon from forming

If i place my cursor in the function editor bar and simply press return, Excel updates the function and all is well. So it is syntactically correct. How can I use the COUNTIF() function?

Also, is there anyway to use formulas that are not already coded into the Aspose object? I don't care about the Excel.CalculateFormula(). I can let Excel do the calculations when the user opens the spreadsheet...Thanks.


#2

I’m having the exact same problem … very fustrating. Is there any solution to this?

Steve


#3

Yes. See the thread entitled: “Unsupported Formulas” just above. Laurence compiled a new version that added support for CountIf().


#4

Hi Steve,

You can download a new fix at http://www.aspose.com/Products/Aspose.Excel/Fixes/Aspose.Excel.zip.
This fix supports countif function.

A formal release will be published in a few days and you can download it at www.aspose.com/downloads .


#5

I found this thread while looking for COUNTIF, but I’m experiencing a weird problem with the hotfix above: I wonder if anyone else has experienced this.

I assigned a Formula to be “=AVERAGE(O2:O70)“

However when I open the Excel file I see the formula stored as
=AVERAGE(‘O2:O70’())

Similarly =(COUNTIF(O2:O70,”<=24”)/O77)*100 becomes
=(COUNTIF(‘O2:O70’(),"<=24")/O77)*100 (note that the O77 is not affected).

This is with aspose.excel.dll version 3.3.2.3.


#6

Ah, the problem goes away with version 3.3.3.0