git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1892097 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-08-07 23:56:22 +00:00
parent 741e290267
commit c79ef7f76d
1 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,11 @@ final class XLookupFunction implements FreeRefFunction {
if (matchedRow != -1) {
if (valueEval instanceof AreaEval) {
AreaEval area = (AreaEval)valueEval;
return area.getRelativeValue(matchedRow, 0);
if (area.getWidth() == 1) {
return area.getRelativeValue(matchedRow, 0);
} else {
return area.getRow(matchedRow);
}
}
}
return ErrorEval.NUM_ERROR;