https://issues.apache.org/bugzilla/show_bug.cgi?id=44950
Josh Micich <[EMAIL PROTECTED]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Summary|VLookup: fails if "table |Area3DEval.getValue()
|array" (2nd arg) contains |calculates wrong array index
|worksheet reference |
--- Comment #2 from Josh Micich <[EMAIL PROTECTED]> 2008-05-07 18:03:53 PST ---
Fixed in svn r654356.
The Vlookup impl was working OK, but there were 2 bugs elsewhere, so I changed
the summary of this bugzilla.
The problem only surfaced if you use a 3D area reference. This first problem
resulted in Vlookup returning '#N/A'. A secondary problem was in
HSSFFormulaEvaluator.evaluateInCell(), that prevented the '#N/A' error code
from being set in the cell. The following code shows that error by itself:
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("Sheet1");
HSSFRow row = sheet.createRow(1);
HSSFCell cell = row.createCell((short) 0);
cell.setCellFormula("na()");'#N/A'
HSSFFormulaEvaluator fe = new HSSFFormulaEvaluator(sheet, wb);
fe.setCurrentRow(row);
fe.evaluateInCell(cell);
2 new junit test cases were added for these bugs.
The common code of Area2DEval and Area3DEval was abstracted into a new
superclass. An additional check was added to make sure that the number of
elements in the values array agrees with the row/col size of the area ref Ptg.
Some junits needed updating.
--
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]