下载.xlsx文件 linux是没有后缀可言的,你当成普通文件写入输出流不行么,非得用mine-type 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看看你的 win 和 Linux 是否都支持 Shift_JIS 还有一个方法是下载XLS的,没有问题,ShiftJIS是支持的。就是不能下载XLSXString fname = excelEntity.getFileName(); String postfix = "xls"; response.reset(); response.setContentType("application/octet-stream;charset=Shift_JIS"); response.setHeader("Content-Disposition", "attachment;filename="+ new String(fname.getBytes("UTF-8"), "ISO-8859-1")+"."+postfix); bos = new BufferedOutputStream(response.getOutputStream()); HSSFWorkbook wb = this.getInventryHSSFWorkbook(request, excelEntity,list); wb.write(bos);实际上这两个方法没有区别,就是setContentType设置有点区别。 關於javascript 呼叫 struts action 問題 在servlet中怎样指定页面转到框架里 页面转向,数据库问题 Sruts验证框架 Timestamp类型转换为DATE类型 那位给一个在线考试系统的原代码? type="button"与type="submit"的区别是什么 最大化参数? 关于json-lib JSONObject.fromObject使用的问题 哪位高人做过“无限目录”,请点拨一下其原理与具体实现方法,最好有例子参考。 有没有人做过jquery实现温度计的例子 jsp网络安全
还有一个方法是下载XLS的,没有问题,ShiftJIS是支持的。就是不能下载XLSXString fname = excelEntity.getFileName();
String postfix = "xls";
response.reset();
response.setContentType("application/octet-stream;charset=Shift_JIS");
response.setHeader("Content-Disposition", "attachment;filename="+ new String(fname.getBytes("UTF-8"), "ISO-8859-1")+"."+postfix);
bos = new BufferedOutputStream(response.getOutputStream());
HSSFWorkbook wb = this.getInventryHSSFWorkbook(request, excelEntity,list);
wb.write(bos);
实际上这两个方法没有区别,就是setContentType设置有点区别。