I'm new to JXLS library. Inside Jx:each area, I am using IF statement in a cell, K36, which is referencing a cell J36: $[IF("${account.type}"="Cash Flow", J36, 0)] when i run the template i'm getting error : 2023-03-23 12:02:33,566 ERROR [org.jxls.transform.poi.PoiTransformer(https-openssl-nio-8445-exec-7)] - Failed to set formula = IF("Cash Flow"="Cash Flow", J44,J63,J82, 0) into cell = 'Journal Entries'!K44 org.apache.poi.ss.formula.FormulaParseException: Too many arguments to function 'IF'. At most 3 were expected but got 5.
I'm trying to find if this even allowed if yes how to fix this error.
I tried several combinations for IF statement, listing few below, but non of them work. J36 is a sum of other cells.
$[IF("${account.type}"="Cash Flow", SUM(E36:I36), 0)]
$[IF("${account.type}"="Cash Flow", SUM(E36, F36, H36 + I36, 0)]
$[IF("${account.type}"="Cash Flow", (J36), 0)]
$[IF("${account.type}"="Cash Flow", $J36, 0)]
$[IF("${account.type}"="Cash Flow", {J36}, 0)]
$[IF("${account.type}"="Cash Flow", ${J36}, 0)]