From 1434c766a3af394a9717d0edeffe6e037addb034 Mon Sep 17 00:00:00 2001 From: Yegor Kozlov Date: Mon, 5 Mar 2012 12:11:13 +0000 Subject: [PATCH] bugzilla 52818 - Added implementation for RANK() git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1297021 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/status.xml | 1 + .../poi/ss/formula/eval/FunctionEval.java | 1 + .../apache/poi/ss/formula/functions/Rank.java | 129 ++++++++++++++++++ .../poi/ss/formula/functions/TestRank.java | 68 +++++++++ test-data/spreadsheet/FormulaEvalTestData.xls | Bin 167936 -> 167424 bytes test-data/spreadsheet/rank.xls | Bin 0 -> 28160 bytes 6 files changed, 199 insertions(+) create mode 100644 src/java/org/apache/poi/ss/formula/functions/Rank.java create mode 100644 src/testcases/org/apache/poi/ss/formula/functions/TestRank.java create mode 100644 test-data/spreadsheet/rank.xls diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index 64508fdb8..df242e644 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 52818 - Added implementation for RANK() 52682 - allow setting text with trailing carriage return in HSLF 52244 - use correct text attributes when presentation has multiple TxMasterStyleAtoms of the same type support setting background color of sheet tab in XSSF diff --git a/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java b/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java index 65ca0f89a..fb4f8d725 100644 --- a/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java +++ b/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java @@ -171,6 +171,7 @@ public final class FunctionEval { retval[212] = NumericFunction.ROUNDUP; retval[213] = NumericFunction.ROUNDDOWN; + retval[216] = new Rank(); retval[219] = new Address(); //Aniket Banerjee retval[220] = new Days360(); retval[221] = new Today(); diff --git a/src/java/org/apache/poi/ss/formula/functions/Rank.java b/src/java/org/apache/poi/ss/formula/functions/Rank.java new file mode 100644 index 000000000..c6ff86068 --- /dev/null +++ b/src/java/org/apache/poi/ss/formula/functions/Rank.java @@ -0,0 +1,129 @@ +/* + * ==================================================================== + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.apache.poi.ss.formula.functions; + +import org.apache.poi.ss.formula.eval.AreaEval; +import org.apache.poi.ss.formula.eval.ErrorEval; +import org.apache.poi.ss.formula.eval.EvaluationException; +import org.apache.poi.ss.formula.eval.NumberEval; +import org.apache.poi.ss.formula.eval.OperandResolver; +import org.apache.poi.ss.formula.eval.RefEval; +import org.apache.poi.ss.formula.eval.ValueEval; + + +/** + * Returns the rank of a number in a list of numbers. The rank of a number is its size relative to other values in a list. + + * Syntax: + * RANK(number,ref,order) + * Number is the number whose rank you want to find. + * Ref is an array of, or a reference to, a list of numbers. Nonnumeric values in ref are ignored. + * Order is a number specifying how to rank number. + + * If order is 0 (zero) or omitted, Microsoft Excel ranks number as if ref were a list sorted in descending order. + * If order is any nonzero value, Microsoft Excel ranks number as if ref were a list sorted in ascending order. + * + * @author Rubin Wang + */ +public class Rank extends Var2or3ArgFunction { + + public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1) { + + AreaEval aeRange; + double result; + try { + ValueEval ve = OperandResolver.getSingleValue(arg0, srcRowIndex, srcColumnIndex); + result = OperandResolver.coerceValueToDouble(ve); + if (Double.isNaN(result) || Double.isInfinite(result)) { + throw new EvaluationException(ErrorEval.NUM_ERROR); + } + aeRange = convertRangeArg(arg1); + } catch (EvaluationException e) { + return e.getErrorEval(); + } + return eval(srcRowIndex, srcColumnIndex, result, aeRange, true); + } + + public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1, ValueEval arg2) { + + AreaEval aeRange; + double result; + boolean order=false; + try { + ValueEval ve = OperandResolver.getSingleValue(arg0, srcRowIndex, srcColumnIndex); + result = OperandResolver.coerceValueToDouble(ve); + if (Double.isNaN(result) || Double.isInfinite(result)) { + throw new EvaluationException(ErrorEval.NUM_ERROR); + } + aeRange = convertRangeArg(arg1); + + ve = OperandResolver.getSingleValue(arg2, srcRowIndex, srcColumnIndex); + int order_value = OperandResolver.coerceValueToInt(ve); + if(order_value==0){ + order=true; + }else if(order_value==1){ + order=false; + }else throw new EvaluationException(ErrorEval.NUM_ERROR); + + } catch (EvaluationException e) { + return e.getErrorEval(); + } + return eval(srcRowIndex, srcColumnIndex, result, aeRange, order); + } + + private static ValueEval eval(int srcRowIndex, int srcColumnIndex, double arg0, AreaEval aeRange, boolean descending_order) { + + int rank = 1; + int height=aeRange.getHeight(); + int width= aeRange.getWidth(); + for (int r=0; rarg0 || !descending_order && valuerR)}9WEQjv4I^a#~F*Z==fajUog;b@vuj zb87w9YVK|b2WOa?=c%;|)qJeetrjV%I+jLFR7Is!LvhrPP7ouT`3NT>e)=c1Ve~%O z2HF7oiBqI<#U;=srcY4`b#`X5!e2>ocC}M(jAF>HQElVz#wnmrD;MwE#dFR^k9!!S z@wc0ta}IRrRfKY=?869DhPl}L4OH@bD3@`!wc6WE=&jS}QQ5bfPM7|w!7|slBDbWw zZgC3o!eGC(MG*ZSgnYCQMO-E$c_~wU118;ByWL(3!MnD)ga51B+I;WS)~>i3M~r^% zXLPpz4FCDtI)l9L=&?hs^;X(^1DLnc;U5rpr;J_mo&27*82i7_{2ODyq&wRlw)cC7 zJqLe=-_sZK3t&FVb)SGB-=4Ocy}gC2aP3(OqcX{F3G-8q`i)@z%5}ehpnx99^Hf08 z8i*aI_7b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jm z#)H&;@*%Ps(QM;MS8vEQ0k{FDH+W2ORwj*IQ>BNu$j@)Bz49*glJlkUHNknqI)9U9 z)}iI*Xg3*2_*A2Xnq@_qIZGCmlK4_t;N^ugnVfdG%v@ma;#XDql;9ti;DT&9g?9 zz}MzCl+{>ss;Vm%Yn!te*vgagrODM^PM$Zfs{Cp%>s{^zlb&8`U3#KdUWUtaVYge< zXLJ97vR1M=ZM*{TT$YcZYeSPvy52|3$-n+pNV`8wn;1Wp_cQnGPp-pIfMG#T-RJeb zqGc6t*?cc=WCz5Od%2Buitho#JFqGd%kJYVJdZ;>r)~s9&)^f~=GA;wUQSL<_PCtv z;fcw^GRLJ3%jtbZdwFE%XO4-^PR-8DN*$Mxm7!hGkIxztotd1On30^AIXo*dOI{_QF#kn;+fW?bTYxu;ZPtmwsZ{OjPAEB{y)W1x6g7{Mmg@E!qLkuY0 zq)RUrt>s0&aztlT%&%>*POM#CUE4(B=vqG9y(M3#{$~-L(quDezK~qk diff --git a/test-data/spreadsheet/rank.xls b/test-data/spreadsheet/rank.xls new file mode 100644 index 0000000000000000000000000000000000000000..4d2521af4b57c7566e088c3f95524869127efb1f GIT binary patch literal 28160 zcmeHQdvILUdH?P{q?IgNma&ar*lYPE`5}xX+c?HvJuDf64IbMRQ_PsPw89$8l1G-P znZdPalYa`$!=})H+msTTA)!fmw4_rf7^VYsMx;y&B~XTvhB9>0X?ZklVZhtp@0@#g z&pmthdN*-8$#n0|eSPrZzde6LV^ECBJyXkXK@tyXYBjsD6f&hL8*n=bhYEim7!8%7fkUcN;4dTWxFL*52k3pV2Z0Q zkiwBvXkHEl8dO)jBvO(XO^ z(A04NQd*=LKd_p7E0ZSE%A}7YC9CCgeqlNXetAkYLu4wI7rI_np&aumaM(96~5&lOH}fqk@}Bs}`P4Gs5Cxqphp?o;V&a`b_LXBIuPNMcVbdK@uN+4+Bv zKy99XHW#56OTW5E`jvt7TF6pz|I-yKTJ98&o-23l=XDNEf(*aFEYSZ@Q zrNfR03y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