I have a bean with method to generate report so done with jett:
Map<String, Object> beans = new HashMap<String, Object>();
beans.put("fichasTecnicasMateriaPrimaResumo", fichasTecnicasMateriaPrimaResumo);
try {
ExcelTransformer transformer = new ExcelTransformer();
transformer.transform("template.xls", "precificacao.xls", beans);
} catch (IOException e) {
System.err.println("IOException reading " + "template.xls" + ": " + e.getMessage());
} catch (InvalidFormatException e) {
System.err.println("InvalidFormatException reading " + "template.xls" + ": " + e.getMessage());
}
I'm having an IOException just in transformer.transfom (...), and I put template.xls in the same folder as the bean; in fact I did equal the documentation of the jett and they do not explain much the. Any help is welcome!