You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2017/03/19 20:29:55 UTC
svn commit: r1787658 - in /poi/trunk:
src/java/org/apache/poi/ss/formula/functions/DGet.java
test-data/spreadsheet/DGet.xls
Author: centic
Date: Sun Mar 19 20:29:55 2017
New Revision: 1787658
URL: http://svn.apache.org/viewvc?rev=1787658&view=rev
Log:
60823: DGET function, correct behavior with multiple result entries but only one non-blank
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/DGet.java
poi/trunk/test-data/spreadsheet/DGet.xls
Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/DGet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/DGet.java?rev=1787658&r1=1787657&r2=1787658&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/DGet.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/DGet.java Sun Mar 19 20:29:55 2017
@@ -36,10 +36,18 @@ public final class DGet implements IDSta
{
result = eval;
}
- else // There was a previous match, since there is only exactly one allowed, bail out.
+ else // There was a previous match. Only one non-blank result is allowed. #NUM! on multiple values.
{
- result = ErrorEval.NUM_ERROR;
- return false;
+ if(result instanceof BlankEval) {
+ result = eval;
+ }
+ else {
+ // We have a previous filled result.
+ if(!(eval instanceof BlankEval)) {
+ result = ErrorEval.NUM_ERROR;
+ return false;
+ }
+ }
}
return true;
Modified: poi/trunk/test-data/spreadsheet/DGet.xls
URL: http://svn.apache.org/viewvc/poi/trunk/test-data/spreadsheet/DGet.xls?rev=1787658&r1=1787657&r2=1787658&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org