JAVA输出EXCEL文件名中文乱码解决
response.setCharacterEncoding(“UTF-8”);
String filename = new String( “明细记录”.getBytes(“utf-8” ), “ISO8859-1” );
response.setHeader(“Content-disposition”, “attachment; filename=”+filename+".xls");// 设定输出文件头
response.setContentType(“application/msexcel”);// 定义输出类型
JAVA输出EXCEL文件名中文乱码解决
最新推荐文章于 2024-07-22 14:15:06 发布