phpexcel 1.8.1 Calculation error #1176
Comments
Entirely possible.... But how can you possibly expect us to know whether either figure is right or wrong without providing details of the formula, values, etc? |
ok, this upload file is my use excel file i read is sheet index of 11 cell D28 and E28, Thank you for your reply |
Hi,MarkBaker I use the java poi to read the excel from give you excel file ,I get a right result, so i think is bug? i don't no ,so ..... |
import org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator; File file = new File(path); FileInputStream fis = new FileInputStream(file);` //XSSF XSSFWorkbook xssfWorkBook = new XSSFWorkbook(fis); XSSFSheet sheet0 = xssfWorkBook.getSheetAt(0); XSSFCell xssfCell = sheet0.getRow(26).getCell(2); switch (xssfCell.getCellType()) { case HSSFCell.CELL_TYPE_NUMERIC: double val = xssfCell.getNumericCellValue(); System.out.println(val); break; case HSSFCell.CELL_TYPE_STRING: String val2 = xssfCell.getStringCellValue() + ""; System.out.println(val2); break; default: String val3 = ""; System.out.println(val3); } //xssfCell.setCellValue(3.0); XSSFSheet sheet11 = xssfWorkBook.getSheetAt(11); XSSFFormulaEvaluator eva = new XSSFFormulaEvaluator(xssfWorkBook); double result = eva.evaluate(sheet11.getRow(24).getCell(3)).getNumberValue(); System.out.println(result); |
this is PhpSpreadsheet code but this result is same to phpExcel
|
hi, @MarkBaker I'm looking forward to your reply |
Expected Value is 12.1848172419427 (from function getOldCalculatedValue)
Calculated Value is 5.272696389978087 (from function getCalculatedValue)
I'm read a excel , the office result value is 12.18...... but the phpexcel read result is 5.2
The text was updated successfully, but these errors were encountered: