Sorry to sound like a broken record.. Again.

Ok.. Point your attention to the formula parser, specifically the 
public constructor FormulaParser(String, Workbook) and the two 
toFormulaString methods (SheetReferences, List) and (SheetReferences,
Ptgs[]) respecfully.

Here's my problem.

When dealing with a HSSFWorkbook, AFAIK, it's impossible to support
formula parsing when formulas reference another sheet in the workbook
because of the private functions restricting access to both the 
internal Workbook that the HSSFWorkbook contains and the SheetReferences
that.  You'll recall that there was a patch some time back that
converted a lot of the formula parser's methods to use SheetReferences
instead of the Workbook, but SheetReferences has the same problem in 
that you can't call getSheetReferences on a HSSFWorkbook (the method
doesn't exist), and getSheetReferences can't be called on the 
Workbook itself if you can't do a getWorkbook() on it's HSSFWorkbook
since it's private.

I created and submitted a patch that allowed HSSFWorkbook to grab 
a copy of the SheetReferences, but it was shot down for fear of
exposing too much of the internal Workbook guts, which I don't have
a problem with.  

Is there something I'm overlooking here?  Is nobody else out there
parsing formula's with references to other sheets?  I have an example
spreadsheet and a little tiny test case if anybody's interested.

Probably the most obvious way to fix this is to allow access from
the formula parser to the internal workbook so it can gather the data
it needs to support external sheet references.

Thoughts?  Comments?

Thanks,

Eric


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to