Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | ODFF: Make LARGE() and SMALL() return an array if the second parameter is an array. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | ooo | ||||||||
Component: | programming | Assignee: | AOO issues mailing list <issues> | ||||||||
Status: | REOPENED --- | QA Contact: | |||||||||
Severity: | Trivial | ||||||||||
Priority: | P3 | CC: | issues, kamataki, masaya.k | ||||||||
Version: | OOo 1.0.0 | Keywords: | ms_interoperability | ||||||||
Target Milestone: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||||
Developer Difficulty: | --- | ||||||||||
Attachments: |
|
Description
ooo
2004-07-30 12:05:18 UTC
Accepted. reassign to myself Accepted. Closing issue. It seems this has already been implemented in OOo2.0 with the general array handling capability. At least I wasn't able to produce a range-as-second-parameter case in Excel that was not handled by OOo. If you happen to know such case feel free to reopen this issue. Eike Closing. Please reopen this issue. MS-Excel allows "=LARGE(A1:A10,{1,2,3})", OOo2.x "LARGE(A1:A10;{1;2;3})", and looks like it works fine. But, for example, use LARGE()/SMALL() with AVERAGE(), problem occured. If "A1, A2, ..., A10 = 1, 2, ..., 10" and anothe cell(MS-Excel) = " =AVERAGE(LARGE(A1:A10,{1,2,3}))", return value of AVERAGE() is 9. (so that means (10+9+8)/3) OOo imported avobe .xls file, AVERAGE() retunrs 10. LARGE() not works fine. Plese look at 3 files which I attached. #Japanese Q&A ( http://oooug.jp/faq/index.php?faq%2F4%2F1024 ) 作成された添付 (id=53791) MS-Excel file(Created Excel 2003). 作成された添付 (id=53792) capture of original(Excel file) result. 作成された添付 (id=53793) capture of opening by OOo2.4.0 original(Excel file) result. Thanks for letting us know. Problem is that LARGE() and SMALL() do not return an array in this case, but only a single value instead, as can also be seen with =SUM(LARGE(A1:A10;{1;2;3})). Note that in Excel =SUM(LARGE(A1:A10,B1:B3)) with B1:B3 containing {1,2,3} is not the same and does not evaluate as an array, but generates an error instead. In array evaluation also a 2D array is handled as second parameter, as can be seen with =COLUMNS(LARGE(A1:A10,{1,2;3,4})) and =ROWS(LARGE(A1:A10,{1,2;3,4})) Reopening this issue and adapting summary to reflect detail. Other quirks observed in Excel: For LARGE(list;N), ROUNDUP(N;0) is applied, not INT(N). For SMALL(list;N), probably ROUNDDOWN(N;0) is applied, effectively being INT(N) for positive numbers. Reset assigne to the default "issues@openoffice.apache.org". |