设置响应头文件名称编码
URLEncoder.encode(fileName, "UTF-8")
String fileName = "工作任务办理单";//输出Excel文件OutputStream output = response.getOutputStream();response.reset();//设置响应头response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".xls");response.setContentType("application/x-xls");wb.write(output);output.close();