https://issues.apache.org/bugzilla/show_bug.cgi?id=51041

           Summary: A major problem with parsing formula
           Product: POI
           Version: 3.6-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


HI, 
    I found a problem when i set a formula in a cell.
    I set some cell's value , and export it , like this.
    Cell A1 's value is int(1), cell B1's value is int(2), and a fomula in cell
C1 is "=sum(A1+B1)".
   When i export this excel file, i find the formula can't calculate right. It
shows "#VALUE!".

    Then i found something for this problem.
    In the last case, poi parsed the formula and the result of tokens was :
    1. RefPtg  ptgclass (Ptg.CLASS_REF)         A1
    2. RefPtg  ptgclass (Ptg.CLASS_REF)         B1
    3. AddPtg                                                 +
    4. FunVarPtg                                           SUM
    The excel show it can't work when doing the add action.
    And if i parsed the formula "=A1+B1", the result of tokens was :
    1. RefPtg  ptgclass (Ptg.CLASS_VALUE)    A1
    2. RefPtg  ptgclass (Ptg.CLASS_VALUE)    B1
    3. AddPtg                                                 +
    and it calculate right;

    so i guess maybe excel only can do add action when the two ptg's ptgclass
is Ptg.CLASS_VALUE.

    Sorry for my poor english.

-- 
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]

Reply via email to