Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-421

PMT formula fails when optional parameter is empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 5.6.1
    • 5.6.0
    • Formula
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      open the attached xlsx file
      PMT-with-empty-4th-param.xlsx

      Current Result

      the PMT formula with an empty (but optional) 4th evaluates into an error

      Expected Result

      formula should evaluate using the default value '0' for the 4th arg
      e.g. as in LibreOffice Calc (also works in MS Excel)

      Debug Information

      the default values for omitted formula arguments only consider the last one or the last 2 missing args (but not the case when only the 4th parameter is empty)

      org.zkoss.poi.ss.formula.functions.FinanceFunction#evaluate(org.zkoss.poi.ss.formula.eval.ValueEval[], int, int)

      Workaround

      omit the last 2 optional arguments or provide a the default value for the 4th arg manually

            henrichen henrichen
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: