https://bz.apache.org/bugzilla/show_bug.cgi?id=65988

            Bug ID: 65988
           Summary: Rate function giving incorrect results
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: major
          Priority: P2
         Component: POI Overall
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hi Team,

Please find the code below

double nper = 360.0;
double pmt = 6.56;
double pv = -2000.0;

XSSFWorkbook workbook = new XSSFWorkbook();
Sheet sheet = workbook.createSheet();

XSSFRow row = (XSSFRow) sheet.createRow(1);
XSSFCell cell = row.createCell(1);

cell.setCellType(Cell.CELL_TYPE_NUMERIC);
cell.setCellFormula("RATE(" + nper + ", " + pmt + ", " + pv + ")");
FormulaEvaluator evaluator =
workbook.getCreationHelper().createFormulaEvaluator();

evaluator.evaluateInCell(cell);
double rate = cell.getNumericCellValue();


Result : 0.0

whereas in excel I get: 0.0009480170844060

This is currently affecting one of our critical flows in production. Could you
please suggest how to fix this?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to