poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mouss4rs <oukna.musta...@gmail.com>
Subject Re: The totals aren't recalculated
Date Wed, 02 May 2012 11:29:34 GMT
1. recalculate formulas yourself using FormulaEvaluator => no because they
are many many cells
2. Call workbook.setForceFormulaRecalculation(true); Excel will => I did
this:

/ System.out.println("*******************SEMAINE 52*********************");
for (int y=0; y<nbPrenomsQ; y++){
if(Quimper[0][y]!=null){
int z;
repet :for(z = 0; z&lt;nbPrenomsS; z++){
if(Saphyr[0][z]!=null){
if(semaineSaphyr==52){
System.out.println(Quimper[0][y]+y+&quot;   =   &quot;+Saphyr[0][z]+z);
if(Quimper[0][y].equals(Saphyr[0][z])){
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(&quot;[h]:mm:ss&quot;));
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);
System.out.println(&quot;SEMAINE 52: &quot;+Quimper[0][y]+y+&quot;   =  
&quot;+Saphyr[0][z]+z+&quot;a fait: &quot;+tabheures[1][z]);
System.out.println(&quot;on écrit l'heure trouvée à la
ligne&quot;+Quimper[1][y]);
z=0;
break repet;
}
}
}
}
z=0;
}
}
 // Write the output to a file
FileOutputStream fileOut = new FileOutputStream(fichierQuimper);
wb2.write(fileOut);
fileOut.close();
&lt;b>wb2.setForceFormulaRecalculation(true); */

but when i opening the workbook, it didn't re-calculate all formulas  ???



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/The-totals-aren-t-recalculated-tp5680022p5680235.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Mime
View raw message