| | |
| | | sheet1.getRow(rownum).createCell(5).setCellValue(qth.getQh() + "%"); |
| | | sheet1.getRow(rownum).createCell(6).setCellValue(qth.getTitle()); |
| | | } |
| | | |
| | | |
| | | //取出电池组信息构建excel文件的名称 |
| | | String excelName =new BattInfImpl().serchExcelName(bmd.getBinf().getBattGroupId()); |
| | | //excel文件名 |
| | | String testTime = new SimpleDateFormat("yyyy-MM-dd").format(bmd.getSdata().getTest_starttime()); |
| | | excelName = excelName+"-"+testTime; |
| | | String regEx="[\n`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。, 、?]"; |
| | | excelName = excelName.replace(regEx,""); |
| | | // 转码防止乱码 |
| | | resp.addHeader("Content-Disposition", "attachment;filename=" |
| | | + new String(excelName.getBytes("gb2312"), "ISO8859-1") |