先看看样版吧
具体代码实现:
附上一段Excel 下载的代码
try {
response.reset();// 清空输出流
response.addHeader("Content-disposition","attachment;filename=" + new String( "财务报表(预订).xlsx".getBytes("utf8"), "ISO8859-1" ));
response.setContentType("application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding("utf-8");
wb.write(response.getOutputStream());
} catch (IOException e) {
logger.error("out 写 excel 文件出错。。 请重新再试",e);
throw e;
}
参考资料
http://xiaohewoai.iteye.com/blog/1300817 这个是 配色的