Bug 44762 - XSSF FormulaEvaluator does not handle 3D refs or Name tokens
Summary: XSSF FormulaEvaluator does not handle 3D refs or Name tokens
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: Macintosh Mac OS X 10.3
: P4 blocker (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2008-04-06 13:49 UTC by Josh Micich
Modified: 2008-04-16 03:40 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Josh Micich 2008-04-06 13:49:43 UTC
In HSSF, the formula evaluator passes around a hsss.model.Workbook for 2 purposes:
 - resolving cross-sheet references (Ref3dPtg and Area3dPtg)
 - resolving named ranges and non-built-in functions (NamePtg and NameXPtg)

A common interface could be introduced to represent this functionality.  In HSSF, the concrete class hssf.model.Workbook could implement this interface.  In XSSF, perhaps an adapter wrapping XSSFWorkbook could be written.  Maybe an adapter in both places.
Comment 1 Nick Burch 2008-04-07 03:34:59 UTC
I have a feeling that HSSFWorkbook / XSSFWorkbook (and hence ss.usermodel.Workbook) will already do the named range stuff for us, so that ought to be an easy change

Is the sheet lookup actually the "get sheet from external sheet number/ref" stuff? If so, I think we could probably put that onto ss.usermodel.Workbook, and have HSSFWorkbook delegate that onto the model.Workbook

I'll have a go at tweaking shortly
Comment 2 Nick Burch 2008-04-16 03:40:53 UTC
I've updated trunk to use hssf.usermodel.HSSFWorkbook, and then applied the same thing to the branch, switched to ss.usermodel.Workbook

All the tests now pass, but there is one rather icky method I've had to put onto ss.usermodel.Workbook:
  public String resolveNameXText(int refIndex, int definedNameIndex)

We'll want to replace that with something better, once someone can figure out what it does!