POI does not re-calculate formulas automatically. You have two options: 1. recalculate formulas yourself using FormulaEvaluator, 2. Call workbook.setForceFormulaRecalculation(true); Excel will re-calculate all formulas when opening the workbook.
Yegor On Wed, May 2, 2012 at 1:15 PM, mouss4rs <[email protected]> wrote: > Hi, > > i write in a cell normally like this: > > /row2 = sheet2.getRow(Integer.parseInt(Quimper[1][y])); > cell2 = row2.createCell(66); > cell2.setCellValue(tabheures[1][z]/24.0); > cellStyle = wb2.createCellStyle(); > cellStyle.setDataFormat(fmt.getFormat("[h]:mm:ss")); > cellStyle.setBorderBottom(BorderStyle.THIN);//bordure du bas > cellStyle.setBottomBorderColor(HSSFColor.BLACK.index); > cellStyle.setBorderLeft(BorderStyle.THIN);//bordure gauche > cellStyle.setLeftBorderColor(HSSFColor.BLACK.index); > cellStyle.setBorderRight(BorderStyle.THIN);//bordure droite > cellStyle.setRightBorderColor(HSSFColor.BLACK.index); > cellStyle.setBorderTop(BorderStyle.THIN);//bordure du haut > cellStyle.setTopBorderColor(HSSFColor.BLACK.index); > cellStyle.setAlignment(HorizontalAlignment.CENTER); > cellStyle.setFillForegroundColor(HSSFColor.BLUE.index); > cellStyle.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); > cell2.setCellStyle(cellStyle);/ > > But when i open my excel file, *i see that the totals are not recalculated*. > > Are we obliged to rewrite the formula of calculation or Is there a simpler > solution ?? > > Thanks > > -- > View this message in context: > http://apache-poi.1045710.n5.nabble.com/The-totals-aren-t-recalculated-tp5680022.html > Sent from the POI - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
