Commit 69f01997 authored by chase's avatar chase

fix bug

parent 36dfd840
......@@ -413,12 +413,13 @@ public class TaxDocumentController {
try{
is = httpFileService.getUserTemplate(url);
tWorkbook = WorkbookFactory.create(is);
for(int i = 0;i<tWorkbook.getNumberOfSheets();i++){
for(int i = 1;i<tWorkbook.getNumberOfSheets();i++){
POIUtil.cloneSheet(tWorkbook.getSheetAt(i), workbook.createSheet(tWorkbook.getSheetAt(i).getSheetName()));
}
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("test.xlsx".getBytes("GB2312"), "ISO-8859-1"));
ouputStream = response.getOutputStream();
tWorkbook.write(ouputStream);
workbook.write(ouputStream);
}catch (Exception e){
e.printStackTrace();
}finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment