Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | [From Symphony]Last agrument of formula should not be removed | ||||||
---|---|---|---|---|---|---|---|
Product: | Calc | Reporter: | Yan Ji <yanji.yj> | ||||
Component: | open-import | Assignee: | AOO issues mailing list <issues> | ||||
Status: | CLOSED FIXED | QA Contact: | |||||
Severity: | Normal | ||||||
Priority: | P3 | CC: | binbjguo, leiw, liushenf, rb.henschel, zhanglu.aoo | ||||
Version: | 3.4.0 | ||||||
Target Milestone: | 4.0.0 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
Yan Ji
2012-06-11 08:36:15 UTC
That topic is a very old one. Please have a look at issue 3879. AVERAGEA is not the only problem of this kind. Daniel Rentz has written a list and attached to that issue, which might interest you. Created attachment 78311 [details]
Add patch
Root Cause: When reading Excel 2k3/2k7 doc, comma will be ignored if it is in the end of a formula. Resolution: When reading Excel 2k3/2k7 doc, if meet comma in the end of a formula, add a number '0' (this solution only apply on those function that default value is 0 when meet miss argument, and which can't be skipped. e.g.COUNT, SUM, AVERAGE, MIN, MAX, NPV..., refer to the attachment of issue 3879). In this solution, no matter where empty parameter appeared(beginning, middle or end of the parameter list), value 0 always will be added. Function list that support this solution as following: {Count, CountA, Average, Min, MinA, Max, MaxA, StDev, StDevA, Var, VarP, AveDev, Kurt, Schiefe, VarPA, VarA, DevSq}. The set is refer to issue 3879's conclusion. And get same result with MS Excel. I will take care of this Reviewed. Patch looks good. Thanks for the good work. Applied on SVN revision 1352412 Verified on latest AOO Trunk 0817 build on Window OS/Linux OS/Linux 64bit OS, this bug is fixed. The last comma is removed, but currently the result is the same as that in MS Excel. Empty argument appears in the end of formula AVERAGEA, like =AVERAGEA(1,2,3,) , the argument does not use a number '0' to instead, but remove the 4th argument results in the result is 2, it is different with that in Excel(the result is 1.5). but it works fine with formula AVERAGE. So I close this bug and logged a new one 121230 to check the rest work. https://issues.apache.org/ooo/show_bug.cgi?id=121230 set Target Milestone to AOO 3.5.0 for PM purpose. |