https://issues.apache.org/bugzilla/show_bug.cgi?id=55906
Bug ID: 55906
Summary: [PATCH] Correctly evaluate/parse multisheet reference
for XLS documents
Product: POI
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 31132
--> https://issues.apache.org/bugzilla/attachment.cgi?id=31132&action=edit
Patch to correct HSSF evaluator/parser
This patch modifies the parse/evaluator to enable multisheet references in
formulae to be properly evaluated. Such formulae take the form SheetA:SheetB,
such as SUM(Sheet1:Sheet3!A1). POI usually ignores the second sheet and only
thinks the formulae is SUM(Sheet1!A1).
Steps to reproduce
1. Create a workbook with two sheets (Sheet1, Sheet2)
2. On each tab enter 1 for cell A1
3. On the first sheet enter formula '=SUM(Sheet1:Sheet2!A1)' for the formula
for cell A2
Expected Result:
A2 should be equal to 2
Actual Result:
A2 equals 1
Fixed checked with 3.8, 3.9, 3.10-beta1, 3.10-beta2, 3.10-beta3. It works with
all versions.
Note: I have only fixed the XLS evaluator/parser (HSSF), the XLSX (XSSF) does
not yet work.
Note2: There are unit tests for XSSF that currently as well (they fail since
the fix is not ported to XSSF).
--
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]