You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/07/05 14:58:52 UTC

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

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #4 from PJ Fanning <fa...@yahoo.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #2 from PJ Fanning <fa...@yahoo.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

Floriano <fl...@tagetik.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
                 CC|                            |chiaramarcheschi@tagetik.co
                   |                            |m,
                   |                            |florianogiambelli@tagetik.c
                   |                            |om, lucamartini@tagetik.com

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #5 from Javen O'Neal <on...@apache.org> ---
Related: bug 58975

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

Floriano <fl...@tagetik.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|florianogiambelli@tagetik.c |
                   |om                          |

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #6 from PJ Fanning <fa...@yahoo.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

--- Comment #3 from Greg Woolsey <gw...@apache.org> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61252

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Dominik Stadler <do...@gmx.at> ---
This is resolved as far as I see.

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