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 2008/02/06 06:02:01 UTC

DO NOT REPLY [Bug 44364] New: - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364

           Summary: [patch] Added Excel functions MATCH, NA, SUMPRODUCT and
                    other fixes
           Product: POI
           Version: 3.0-dev
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: josh@gildedtree.com


Added Implementations for Excel functions MATCH(), NA(), SUMPRODUCT(). Added 
junits.

Rewrote 3 classes(GenericFormulaTestCase, TestEverything, TestEverything) into 
TestFormulasFromSpreadsheet.  This served a few purposes:
 - to allow for more conventional structuring of the test suites
 - to formalise and simplify the interface between the test spreadsheet and 
the test code.
 - to identify and fix a few bugs (related to comparing expected vs actual 
evaluation results)
Those 3 classes should be deleted.  The most correct appropriate predecessor 
of TestFormulasFromSpreadsheet is GenericFormulaTestCase.

Added cases for COUNTA, COUNTIF, MATCH, NA, and SUMPRODUCT to the spreadsheet

As a result of fixing the spreadsheet and related test, a few other bugs 
became visible. 

Fixed Excel error code propagation throughout HSSFFormulaEvaluator.   
Fixed error code handling in ROUNDDOWN(), ROUNDUP() and T(). Added junits.
Note - TestFormulasFromSpreadsheet has a disabled assert which confirms 
expected error codes.  This can be enabled after another 45 functions like 
ROUNDDOWN and ROUNDUP are fixed wrt. error handling.

Fixed bug (involving column area refs) in UnaryPlusEval.  Added junit.

Fixed FormulaParser.toFormulaString() for the case of a single no-arg function 
e.g. "=NOW()". Added junit.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From yegor@dinom.ru  2008-02-07 06:37 -------
Created an attachment (id=21492)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21492&action=view)
junit report on failing TestFormulasFromSpreadsheet


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364


nick@torchbox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From nick@torchbox.com  2008-02-06 06:10 -------
Thanks for this, it's quite the mammoth patch!

I've done a visual review of the patch, and it does seem fine from that. Given
the size, I'll wait a few days for other people to cast an eye over it, and if
no-one shouts I'll then apply it

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From josh@gildedtree.com  2008-02-05 21:04 -------
Created an attachment (id=21478)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21478&action=view)
tar bzip2 of newly added files (5 junit classes)


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From josh@gildedtree.com  2008-02-07 11:38 -------
You need to copy the new version of TestDataValidation.xls to 
src/testcases/org/apache/poi/hssf/data/

I wasn't sure about how to include modified binary files in patch submissions.

The last revision of this file seems to be 615859 (Jan 28), and my work was 
after that so there shouldn't be any need to merge.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From yegor@dinom.ru  2008-02-07 06:36 -------
I exercised your code and TestFormulasFromSpreadsheet fails:

ant
-Dtestcase=org.apache.poi.hssf.record.formula.eval.TestFormulasFromSpreadsheet 
single-scratchpad-test
.....

Test spreadsheet cell empty on row (79). Expected function name or
'<END-OF-FUNCTIONS>'
junit.framework.AssertionFailedError: Test spreadsheet cell empty on row (79).
Expected function name or '<END-OF-FUNCTIONS>'
	at
org.apache.poi.hssf.record.formula.eval.TestFormulasFromSpreadsheet.processFunctionGroup(TestFormulasFromSpreadsheet.java:205)
	at
org.apache.poi.hssf.record.formula.eval.TestFormulasFromSpreadsheet.testFunctionsFromTestSpreadsheet(TestFormulasFromSpreadsheet.java:171)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


See the attached junit report.

All other tests pass.


Yegor 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From josh@gildedtree.com  2008-02-05 21:03 -------
Created an attachment (id=21477)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21477&action=view)
svn diff


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From josh@gildedtree.com  2008-02-05 21:14 -------
Created an attachment (id=21479)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21479&action=view)
new version of TestDataValidation.xls 

svn diff skips binary files
This spreadsheet belongs here:
src/testcases/org/apache/poi/hssf/data/TestDataValidation.xls

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364





------- Additional Comments From nick@torchbox.com  2008-02-14 07:07 -------
Request for next time...

If you are uploading a new version of TestDataValidation.xls again, any chance
you could gzip / bzip it first? It's pretty beasting, and takes an age to
download over GPRS, which is an issue when I decide to work on POI from a cafe!

(Just doing a final review before applying now)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 44364] - [patch] Added Excel functions MATCH, NA, SUMPRODUCT and other fixes

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44364>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44364


nick@torchbox.com changed:

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




------- Additional Comments From nick@torchbox.com  2008-02-14 07:58 -------
Thanks for this, applied to svn

Had to copy the new TestDataValidation.xls to FormulaEvalTestData.xls to get it
to work. I think we need to review the fact that we have these two, and also try
to figure out why TestDataValidation.xls sometimes gets changed

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org