mirror of https://github.com/apache/poi.git
excelant evaluator if seems useless
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896546 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4823d0cbd4
commit
9345c84194
|
@ -164,21 +164,22 @@ public class ExcelAntWorkbookUtil extends Typedef {
|
||||||
*/
|
*/
|
||||||
protected FormulaEvaluator getEvaluator(String fileName) {
|
protected FormulaEvaluator getEvaluator(String fileName) {
|
||||||
FormulaEvaluator evaluator;
|
FormulaEvaluator evaluator;
|
||||||
if (fileName.endsWith(".xlsx")) {
|
if (!fileName.endsWith(".xlsx")) {
|
||||||
if(xlsMacroList.size() > 0) {
|
if(xlsMacroList.isEmpty()) {
|
||||||
|
evaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook);
|
||||||
|
} else {
|
||||||
evaluator = XSSFFormulaEvaluator.create((XSSFWorkbook) workbook,
|
evaluator = XSSFFormulaEvaluator.create((XSSFWorkbook) workbook,
|
||||||
null,
|
null,
|
||||||
getFunctions());
|
getFunctions());
|
||||||
}
|
}
|
||||||
evaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook);
|
|
||||||
} else {
|
} else {
|
||||||
if(xlsMacroList.size() > 0) {
|
if(xlsMacroList.isEmpty()) {
|
||||||
|
evaluator = new HSSFFormulaEvaluator((HSSFWorkbook) workbook);
|
||||||
|
} else {
|
||||||
evaluator = HSSFFormulaEvaluator.create((HSSFWorkbook)workbook,
|
evaluator = HSSFFormulaEvaluator.create((HSSFWorkbook)workbook,
|
||||||
null,
|
null,
|
||||||
getFunctions());
|
getFunctions());
|
||||||
}
|
}
|
||||||
|
|
||||||
evaluator = new HSSFFormulaEvaluator((HSSFWorkbook) workbook);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return evaluator;
|
return evaluator;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class CellNumberPartHandler implements PartHandler {
|
||||||
|
|
||||||
case '/':
|
case '/':
|
||||||
//!! This assumes there is a numerator and a denominator, but these are actually optional
|
//!! This assumes there is a numerator and a denominator, but these are actually optional
|
||||||
if (slash == null && specials.size() > 0) {
|
if (slash == null && !specials.isEmpty()) {
|
||||||
numerator = previousNumber();
|
numerator = previousNumber();
|
||||||
// If the first number in the whole format is the numerator, the
|
// If the first number in the whole format is the numerator, the
|
||||||
// entire number should be printed as an improper fraction
|
// entire number should be printed as an improper fraction
|
||||||
|
|
Loading…
Reference in New Issue