First of all I appreciate POI very much and use it successfully to import
data from excel sheets into a web application.


I noticed that evaluating some formulas gives different results from what is
shown in the excel sheet.

Example:

sheet 'Name2'
A1  'Yes'
B1  'Yes'
C1  'Yes'
D1  '=IF(AND(A1="Yes";OR(B1="yes";C1="yes"));"yes";"no")'

Cell D1 is referenced in a formula on sheet 'Name1'.

sheet 'Name1'
X1 '=IF('Name2'!D1="yes";Y1;0)'
Y1 'somevalue'

In the excel sheet X1 on 'Name1' contains 'somevalue'.

Evaluating from POI X1 contains 0.

If I change the formula in D1 to 

'=IF(AND(A1="Yes";OR(B1="Yes";C1="yes"));"yes";"no")'

then POI evaluates X1 on sheet 'Name1' correctly to 'somevalue'. 


expected result in POI also with
'=IF(AND(A1="Yes";OR(B1="yes";C1="Yes"));"yes";"no")'
'=IF(AND(A1="Yes";OR(B1="Yes";C1="Yes"));"yes";"no")'

wrong result in POI with any of these
'=IF(AND(A1="Yes";OR(B1="Yes";C1="Yes"));"Yes";"no")'
'=IF(AND(A1="Yes";OR(B1="Yes";C1="Yes"));"YES";"no")'
'=IF(AND(A1="yes";OR(B1="Yes";C1="Yes"));"yes";"no")'
'=IF(AND(A1="yes";OR(B1="yes";C1="yes"));"yes";"no")'


Apparently strings are evaluated in a case-sensitive manner in POI, but not
in Excel? Is there a setting in POI to switch to case-insensitivity?

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Case-sensitivity-while-evaluating-formulas-tp21682982p21682982.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to