2
I created an excel file using the Apache Poi API, in it I set one of the cells with a formula, but when I open the file I need to "enter" the cell with the formula so that it prints the result in the file. There would be a way to make this result appear automatically?
code:
destino.getSheet("Status dos Testes").getRow(2).createCell(7).setCellType(CellType.FORMULA);
destino.getSheet("Status dos Testes").getRow(2).getCell(7).setCellFormula("CONT.SE($D$6:$D$10000, Legenda!A6)");
this generates an error:
– Mari Teixeira
Exception in thread "AWT-EventQueue-0" org.apache.poi.ss.formula.eval.NotImplementedException: Error evaluating cell 'Status dos Testes'!H3 at org.apache.poi.ss.formula.WorkbookEvaluator.addExceptionInfo(WorkbookEvaluator.java:359)
 at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny(WorkbookEvaluator.java:300)
 at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate(WorkbookEvaluator.java:232)
 at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue(HSSFFormulaEvaluator.java:200)
– Mari Teixeira
AAAH! I got it using this yes! Thank you
– Mari Teixeira