第一种方式:
response.setContentType("application/xls");
response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(fileName,"UTF-8"));第二种方式:
request.setCharacterEncoding("UTF-8");
response.setContentType("Application/excel;charset=GBK");String fileName = "业绩统计表";
fileName = new String(fileName.getBytes("gbk"),"iso-8859-1");
response.addHeader("Content-Disposition","attachment;filename="+fileName+".xlsx");