首页 > 代码库 > jxl导出EXCEL文件名称乱码

jxl导出EXCEL文件名称乱码

开始导出excle时名称是乱码的,加上下面的就可以了,

String FileNam="xx医院_xxxx_xx_xx.xls";

res.setCharacterEncoding("UTF-8");
res.setContentType("application/octet-stream");
String fileName_1 = new String(FileName.getBytes("UTF-8"), "iso8859-1");
res.setHeader("Content-Disposition", "attachment;filename=" + fileName_1);

jxl导出EXCEL文件名称乱码