https://issues.apache.org/bugzilla/show_bug.cgi?id=47048
Summary: HSSF is unable to evaulate the formula SUM(namedRange)
Product: POI
Version: 3.2-FINAL
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=23508)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23508)
workbook containing the scenario described
I've got a named range in my Excel sheet:
Is_Multicar_Vehicle(='Veh Applicability'!$B$17:$G$17) i.e the above named range
refers to cells from B17 to G17 in another sheet named "Veh Applicability".
Now I've the following formula in a cell C19 of sheet named "Input".
=SUM(Is_Multicar_Vehicle)
The following is the code snippet used to evaluate the above cell
HSSFCell cell1 = workbook.getSheet("Input").getRow(18).getCell(2);
CellValue MultipleCarIndicator1 = hsf.evaluate(cell1);
When I try to evalute the above cell, I am getting the below exception
Exception in thread "main" java.lang.RuntimeException: Don't now how to evalate
name 'Is_Multicar_Vehicle'
at
org.apache.poi.ss.formula.WorkbookEvaluator.getEvalForPtg(WorkbookEvaluator.java:439)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula(WorkbookEvaluator.java:334)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:216)
at
org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:180)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue(HSSFFormulaEvaluator.java:297)
at
org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate(HSSFFormulaEvaluator.java:159)
I'm attaching the excel sheet used.
I've used both POI 3.2 final and the 3.5beta5 release.
Please fix this issue. I am very much in need of this.
Regards,
Kiran Sireesh
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]