We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Issue with "COUNTIF" Formula

I detected an issue with the "COUNTIF" expresion in XlsIO.

I am trying to count the occurence of the character "x" in column A1:A20.

In MS-Excel 2007 this can be done with:
=COUNTIF(A1:A20;"x")

However when setting the formula to XlsIO, i get a parse error:

sheet.Range["B5"].Formula="COUNTIF(A1:A20;\"x\")";


2 Replies

HF Harald Fielker March 4, 2009 08:23 AM UTC

Thinking about this problem i came to this conclusion:

There might be a bug in the expression parser of syncfusion. The string "x" should be looked up in the given range, evaluated. Then the result should be checked.

I don't think this will be an easy fix.



GM Geetha M Syncfusion Team March 6, 2009 04:03 AM UTC

Hi Harald,

Thank you for the details.

I was able to see the problem if I set a different regional format other than English(en-US). From the code snippet, I understand that you are using a different culture. In order to make use of the formula, please set the separators for the workbook as shown below:

workbook.SetSeparators(';', ';');

Please try this and let me know if you have any questions.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon