[Bug 61252] New: Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] New: Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

            Bug ID: 61252
           Summary: Error evaluating formulas with more of 30 arguments on
                    excel file 2007 or major.
           Product: POI
           Version: 3.15-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SS Common
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Hi
using Poi 3.15 we have a problem with the evaluation of the formulas with more
than 30 arguments(in our user case we have a SUM operand).
Taking a look to the code we have seen that in the class
MultiOperandNumericFunction.java there is a constant value
DEFAULT_MAX_NUM_OPERANDS = 30.
this value is used during the evaluation of the formulas to check the maximum
number of arguments. According to us should be better to use the value retrieve
from the class SpreadsheetVersion.java but fix in this way the problem require
a lot of changes on the code.
Considering that 30 was the maximum number of arguments of Excel 97, a very old
version, could be more reasonable to use 255 instead that is the limit for
Excel 2007 or major.
The fix using the limit of 255 is very fast and safe.
we looking forward for your feedback
Best Regards
Floriano

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

Floriano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |[hidden email]
                   |                            |m,
                   |                            |[hidden email]
                   |                            |om, [hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

Floriano <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|[hidden email] |
                   |om                          |

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #1 from PJ Fanning <[hidden email]> ---
Floriano - would you be in a position to submit a patch?
org.apache.poi.ss.SpreadsheetVersion has the operand count as a param - 30 for
Excel97 and 255 for Excel2007.
So maybe the fix is to ensure that this gets used instead of using a separate
constant.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #2 from PJ Fanning <[hidden email]> ---
Passing a SpreadsheetVersion around in all these function APIs looks like it
will be a big change.
I think we might need to use a ThreadLocal, similar to LocaleUtil.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #3 from Greg Woolsey <[hidden email]> ---
Is it really so bad to just use the larger version constant in formula
calculation?  Are there cases where we really _need_ to throw an error or stop
processing arguments after 30 for older workbooks?  Could we just note in the
docs that using a formula call with > 30 arguments and then saving in the older
format would cause problems when opening in Excel?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #4 from PJ Fanning <[hidden email]> ---
Greg - that seems like a pragmatic solution - we should just change to this:

private static final int DEFAULT_MAX_NUM_OPERANDS =
SpreadsheetVersion.EXCEL2007.getMaxFunctionArgs();

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #5 from Javen O'Neal <[hidden email]> ---
Related: bug 58975

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Bug 61252] Error evaluating formulas with more of 30 arguments on excel file 2007 or major.

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #6 from PJ Fanning <[hidden email]> ---
I accidentally committed the change to increase the limit to 255 operands in
https://svn.apache.org/viewvc?view=revision&revision=1800949 - I will add some
test cases tomorrow.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...