poi匯出excel中文不顯示問題
用這個方法顯示
response.reset();
response.addHeader("Content-Disposition", "attachment;filename="+ java.net.URLEncoder.encode(f.getName(), "UTF-8"));
OutputStream os= new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/msexcel;charset=UTF-8");
用這個中文不顯示
response.addHeader("Content-Disposition", "attachment;filename="+ new String(f.getName().getBytes()));
OutputStream os= new BufferedOutputStream(response.getOutputStream());
response.setContentType("application/vnd.ms-excel;charset=UTF-8");