jxl导出excel出现乱码怎么解决
2个回答
展开全部
fileName = new String(fileName.getBytes(),"iso-8859-1");
response.setCharacterEncoding("gb2312");
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gb2312");
response.setHeader("pragma", "no-cache");
response.addHeader("Content-Disposition", "attachment;filename=\""
+ fileName + ".xls\"");// 点击导出excle按钮时候页面显示的默认名称
workbook = Workbook.createWorkbook(response.getOutputStream());
response.setCharacterEncoding("gb2312");
response.reset();
response.setContentType("application/OCTET-STREAM;charset=gb2312");
response.setHeader("pragma", "no-cache");
response.addHeader("Content-Disposition", "attachment;filename=\""
+ fileName + ".xls\"");// 点击导出excle按钮时候页面显示的默认名称
workbook = Workbook.createWorkbook(response.getOutputStream());
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询