XLSTransformer transformer = new XLSTransformer();
String distFile = System.getProperty("java.io.tmpdir") + "/" + fileName + ".xls";
File template = ResourceUtils.getFile("classpath:template/excel/" + name + ".xls");
transformer.transformXLS(template.getPath(), beans, distFile);
response.setContentType("application/xls");
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + ".xls\"");
StreamUtils.copy(new FileInputStream(new File(distFile)), response.getOutputStream());
String distFile = System.getProperty("java.io.tmpdir") + "/" + fileName + ".xls";
File template = ResourceUtils.getFile("classpath:template/excel/" + name + ".xls");
transformer.transformXLS(template.getPath(), beans, distFile);
response.setContentType("application/xls");
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + ".xls\"");
StreamUtils.copy(new FileInputStream(new File(distFile)), response.getOutputStream());