| | |
| | | } |
| | | } |
| | | FileOutputStream fileOut =null; |
| | | String timeStr= ActionUtil.sdfwithFTP.format(new Date()); |
| | | if(type.equals("pic")){ |
| | | excelName=timeStr; |
| | | } |
| | | try { |
| | | fileOut = new FileOutputStream(rootFace+File.separator+excelName+".xls"); |
| | | // 写入excel文件 |
| | |
| | | File file=new File(rootFace+".zip"); |
| | | FileOutputStream forootFace = new FileOutputStream(file); |
| | | ZipUtils.toZip(rootFace, forootFace,true); |
| | | String timeStr= ActionUtil.sdfwithFTP.format(new Date()); |
| | | if(type.equals("pic")){ |
| | | excelName=timeStr; |
| | | } |
| | | |
| | | // 转码防止乱码 |
| | | resp.addHeader("Content-Disposition", "attachment;filename=" |
| | | + new String(excelName.getBytes("UTF-8"), "ISO8859-1") |