poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46643] Formula parser should encode explicit range operator with tMemFunc
Date Mon, 02 Feb 2009 22:54:43 GMT

Josh Micich <josh@gildedtree.com> changed:

           What    |Removed                     |Added
            Summary|Inserted rows and cells do  |Formula parser should encode
                   |not notify already existing |explicit range operator with
                   |cells of events             |tMemFunc

--- Comment #6 from Josh Micich <josh@gildedtree.com>  2009-02-02 14:54:42 PST ---
There is definitely something funky going on in attachment (id=23211) .  When
you open it in Excel it has the behaviour you describe (updating cells within
the range does not cause the formula to be automatically updated).  Another
observation is that re-entering the formula (F2, <enter>) in Excel fixes the
problem.  This is almost always a sign that POI has incorrectly encoded the
formula tokens.

BiffViewer shows the formula from the attachment (id=23211) as:
    Ptg[0]=org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! D2]R
    Ptg[1]=org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! D24]R
    Ptg[2]=class org.apache.poi.hssf.record.formula.RangePtg.
    Ptg[3]=org.apache.poi.hssf.record.formula.FuncVarPtg [SUM nArgs=1]V

After re-enterring the formula and saving with Excel this becomes:
    Ptg[0]=org.apache.poi.hssf.record.formula.MemFuncPtg [len=15]R
    Ptg[1]=org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! D2]R
    Ptg[2]=org.apache.poi.hssf.record.formula.Ref3DPtg [sheetIx=0 ! D6]R
    Ptg[3]=class org.apache.poi.hssf.record.formula.RangePtg.
    Ptg[4]=org.apache.poi.hssf.record.formula.AttrPtg [sum ].

I have done a quick test and found that the critical difference is the presence
of the token tMemFunc.  If POI is modified to encode this token, Excel opens
the file OK and the symptoms are gone.  I have changed the summary to reflect

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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message