RemboL opened a new pull request #191: URL: https://github.com/apache/poi/pull/191
I had an array formula that referenced range which contained blank cells - this caused exception, because method evaluateFormulaCellValue did not expect BlankEval. Interestingly enough, this does not happen in normal formulas (Blank cell evaluates to NumberEval[0]). I traced this behavior to WorkbookEvaluator::defererenceResult(ValueEval, OperationEvaluationContext) which branches, depending whether this is AreaEval or not. Part for non-AreaEval (method dereferenceResult(ValueEval,int,int) ) swaps BlankEval for NumberEval.ZERO and part for AreaEval does not. I checked in LibreOffice and expected behavior seems to be that ref to blank cell evalulates to zero (both in array and non-array formula), so I copied this logic to dereferenceResult(ValueEval, OperationEvaluationContext) - I wanted to move it completely, but method dereferenceResult(ValueEval,int,int) is public and used by other class, so removing this piece of code might influence its behavior. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org