From 4ad008ef126203ca10b78ea93884eca1c34654f8 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sat, 7 Aug 2021 10:32:22 +0000 Subject: fix TextJoin use case that was not handled git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892062 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'poi/src/main/java') diff --git a/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java b/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java index 1148267b63..5c64fd8bcd 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/atp/TextJoinFunction.java @@ -104,9 +104,9 @@ final class TextJoinFunction implements FreeRefFunction { if (eval instanceof AreaEval) { AreaEval ae = (AreaEval)eval; List list = new ArrayList<>(); - for (int r = 0; r < ae.getHeight(); r++) { - for (int c = 0; c < ae.getWidth(); c++) { - list.add(ae.getRelativeValue(r, c)); + for (int r = ae.getFirstRow(); r <= ae.getLastRow(); r++) { + for (int c = ae.getFirstColumn(); c <= ae.getLastColumn(); c++) { + list.add(OperandResolver.getSingleValue(ae.getAbsoluteValue(r, c), r, c)); } } return list; -- cgit v1.2.3