This was a red herring.  Tika was hijacking my evaluate function, and it was 
using an old library.

The real problem is that POI isn't handling the reference version of the MS 
Excel Index function.  I could see this when I ran the updated library.  I got 
the following error:

Incomplete code - don't know how to support the 'area_num' parameter yet.

But after staring at the source, I think that it isn't too bad to solve.  The 
problem function has this signature:

public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, 
ValueEval arg1, ValueEval arg2, ValueEval arg3)

arg0 is an array of one or more cell areas.
arg1 and arg2 are row and column indices, respectively.
arg3 is the tricky one.  It is an index into the arg0 array of cell areas.

I think that nearly all of the apparatus is already in place to deal with it in 
the Index class.  I think that it can be solved by pulling the correct cell 
area out of arg0 by casting to an array of cell area objects and taking the 
indicated element from them.  Then the evaluate method with 5 parameters can be 
called to return the ValueEval.

The area reference of interest equals the area reference in the arg0[arg3] 
element. I'm barely familiar with the POI API, so I don't know the correct way 
to do this.  But once the area reference is in the correct form then call

public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, 
ValueEval arg1, ValueEval arg2)

Does this seem reasonable?

Dave

Reply via email to