poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 三木 春樹 <mikihar...@hotmail.co.jp>
Subject About the evaluation of "countif"
Date Mon, 02 Feb 2009 08:49:16 GMT

I'm using POI-3.2-FINAL, and
I want to count the rows in my worksheet and added a formula to the sheet whose value is "countif(B2:B65535,
but when I ran the program and got the generated file, the formula cell did not display the
currect value.
for example, I have two rows of datas, but it displays 0, actually it should be 2.
after tracing the source, I found that the method "evaluate" of the class "Countif" may have
a bug with it.
the argument "cmpResult" is returned by the method "compareTo" of the class "String".
and according to the javadoc of that method, when two strings to be compared is equal, it
returns 0.
but in the method "evaluate", whenever the operator is EQ or NE, it always returns "cmpResult
== 0".
is that a bug? or otherwise, how can I get a row count by using formulas?
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message