Bugzilla 54436: Fixed metadata for GETPIVOTDATA function
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1451875 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
522168dda4
commit
e80c3aabc1
@ -26,6 +26,10 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|||||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||||
import org.apache.poi.openxml4j.opc.PackagePart;
|
import org.apache.poi.openxml4j.opc.PackagePart;
|
||||||
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
import org.apache.poi.openxml4j.opc.PackagingURIHelper;
|
||||||
|
import org.apache.poi.ss.formula.WorkbookEvaluator;
|
||||||
|
import org.apache.poi.ss.formula.eval.ErrorEval;
|
||||||
|
import org.apache.poi.ss.formula.eval.ValueEval;
|
||||||
|
import org.apache.poi.ss.formula.functions.Function;
|
||||||
import org.apache.poi.ss.usermodel.BaseTestBugzillaIssues;
|
import org.apache.poi.ss.usermodel.BaseTestBugzillaIssues;
|
||||||
import org.apache.poi.ss.usermodel.Cell;
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
import org.apache.poi.ss.usermodel.CellStyle;
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
@ -1339,4 +1343,17 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
|||||||
assertEquals(259.0, a1Value, 0.0);
|
assertEquals(259.0, a1Value, 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void test54436(){
|
||||||
|
Workbook workbook = XSSFTestDataSamples.openSampleWorkbook("54436.xlsx");
|
||||||
|
if(!WorkbookEvaluator.getSupportedFunctionNames().contains("GETPIVOTDATA")){
|
||||||
|
Function func = new Function() {
|
||||||
|
public ValueEval evaluate(ValueEval[] args, int srcRowIndex, int srcColumnIndex) {
|
||||||
|
return ErrorEval.NA;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
WorkbookEvaluator.registerFunction("GETPIVOTDATA", func);
|
||||||
|
}
|
||||||
|
workbook.getCreationHelper().createFormulaEvaluator().evaluateAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,13 +271,13 @@
|
|||||||
350 ISPMT 4 4 V V V V V
|
350 ISPMT 4 4 V V V V V
|
||||||
351 DATEDIF 3 3 V V V V
|
351 DATEDIF 3 3 V V V V
|
||||||
352 DATESTRING 1 1 V V
|
352 DATESTRING 1 1 V V
|
||||||
353 NUMBERSTRING 2 2 V V V
|
353 NUMBERSTRING 2 2 V V V
|
||||||
354 ROMAN 1 2 V V V
|
354 ROMAN 1 2 V V V
|
||||||
# New Built-In Sheet Functions in BIFF8
|
# New Built-In Sheet Functions in BIFF8
|
||||||
358 GETPIVOTDATA 2 30
|
358 GETPIVOTDATA 2 30 V V R ...
|
||||||
359 HYPERLINK 1 2 V V V
|
359 HYPERLINK 1 2 V V V
|
||||||
360 PHONETIC 1 1 V R
|
360 PHONETIC 1 1 V R
|
||||||
361 AVERAGEA 1 30 V R ...
|
361 AVERAGEA 1 30 V R ...
|
||||||
362 MAXA 1 30 V R ...
|
362 MAXA 1 30 V R ...
|
||||||
363 MINA 1 30 V R ...
|
363 MINA 1 30 V R ...
|
||||||
364 STDEVPA 1 30 V R ...
|
364 STDEVPA 1 30 V R ...
|
||||||
|
BIN
test-data/spreadsheet/54436.xlsx
Normal file
BIN
test-data/spreadsheet/54436.xlsx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user